Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
thePhoolish
Starting Member
22 Posts |
Posted - 2002-11-16 : 11:10:17
|
| ..I have a table with a ntext column,I'm trying to update this from asp, and have been working solid on this for the last 2 days, without luck. the SP works fine, just the ASP part doesn't, i've been to numerous sites, but most people shy away from this subject....ALTER PROCEDURE SP_UpdateArticles(@strSectionId varchar(3),@txtContent ntext)ASDECLARE @descrip binary(16)SELECT @descrip = TEXTPTR(content)FROM articlesWHERE sectionid = @strSectionIdWRITETEXT articles.content @descrip @txtContentThis is my latest attempt in asp... ....I'm lost as to how to do this strContent = Replace( Request.Form("content"), "'", "''" ) strSectionId = Request.Form("sectionId") SET objConn = Server.CreateObject("ADODB.Connection") objConn.Open "driver={SQL Server};server=localhost;uid=sa;pwd=******;database=dev" Set objCmd = Server.CreateObject("ADODB.Command") Set objCmd.ActiveConnection = objConn objCmd.CommandType = adCmdStoredProc objCmd.CommandText = "SP_UpdateArticles" objCmd.Parameters.Append objCmd.CreateParameter("@strSectionId", adVarchar,adParamInput,3,strSectionId) objCmd.Parameters.Append .CreateParameter("@txtContent", adLongVarChar,adParamInput,1073741823,strContent) objCmd.Execute objConn.Close Set objConn = Nothing |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
|
|
thePhoolish
Starting Member
22 Posts |
Posted - 2002-11-17 : 09:36:30
|
| Hi.. I've got the insert sorted using AppendChunk on the record set field.. ...problem I have now, is to post 200,000 characters from a web form to the database, working on posting using multitype.. reading the binary.. converting the binary then saving to the DB.Is there any other way I can post this chunk of 200,000 characters into the DB, I really need to insert this data ASAP |
 |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2002-11-19 : 14:53:52
|
| You can use aspupload component to upload form text (up to a 2 GIG)and generate a file, then store the path to the file in the database?Edited by - ValterBorges on 11/19/2002 16:52:55 |
 |
|
|
thePhoolish
Starting Member
22 Posts |
Posted - 2002-11-19 : 16:47:24
|
| not really.. it needs to be searchable using Full-Text search...I've tried importing text from a file, then updating.. but the script keep's timing out |
 |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2002-11-19 : 16:56:35
|
| Ok, can still use aspupload to write to file on server and then bulk insert into database.Check your connection timeout settings for your the database and for the web server? |
 |
|
|
thePhoolish
Starting Member
22 Posts |
Posted - 2002-11-22 : 20:09:24
|
| some good ideas there.. can't set the timeout myself, it's a hosted server.. ...until then I'll just have to use QA to upload.. thanks for your help.. |
 |
|
|
|
|
|
|
|