If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > What is the ADO constant for text datatype?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-22-03, 17:20
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Question What is the ADO constant for text datatype?

I have a table (MSSQL 2000 server) with a column called "Content" whose datatype is set to text. Now I'm trying to insert data into the table using a stored procedure. What is the ADO constant that I should use to insert value into that column? My pieces of code are

Dim Conn, cmd
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = Application("ConnStr")
Conn.Open
Conn.BeginTrans
Conn.CursorLocation = adUseClientBatch
Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = Conn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "MyStoredProcedure"

cmd.Parameters.Append
cmd.CreateParameter("content", adLongVarChar, adParamInput, 50000, content)
cmd.Execute

I got the following error message:
Application uses a value of the wrong type for the current operation.

What should I use to replace adLongVarChar? Thanks in advance.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On