silencer01
08-13-2004, 10:36 AM
Hi All,
I'm new to ASP and i'm trying to debug a pre-existing project which uses stored procedures to update a SQL2000 Database. The problem being that they have used VarChar with 4000 characters (which is the maximium). I need to be able to store more the 4000 characters to i have changed the Database to NText. This is causing an error when i attempt to add more the 4000 characters. In creating the parameters the application uses a varible name AdVarWchar. I guess i need to change this to accept NText values so it there and NText equivalent to AdVarChar?
Here is the code:
Sub Savetext
Dim conn, cmd
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("ManageConn")
Set cmd = Server.CreateObject("ADODB.Command")
cmd.CommandType = adCmdStoredProc
cmd.ActiveConnection = conn
cmd.CommandText = "spUpdSponsoring"
cmd.Parameters.Append cmd.CreateParameter("Text", adVarWChar, adParamInput, 4000, Text)
cmd.Parameters.Append cmd.CreateParameter("EventsText", adVarWChar, adParamInput, 4000, EventsText)
cmd.Execute
Set cmd = Nothing
Conn.Close
Set Conn = Nothing
End Sub
Any help or suggestions appreciated.
I'm new to ASP and i'm trying to debug a pre-existing project which uses stored procedures to update a SQL2000 Database. The problem being that they have used VarChar with 4000 characters (which is the maximium). I need to be able to store more the 4000 characters to i have changed the Database to NText. This is causing an error when i attempt to add more the 4000 characters. In creating the parameters the application uses a varible name AdVarWchar. I guess i need to change this to accept NText values so it there and NText equivalent to AdVarChar?
Here is the code:
Sub Savetext
Dim conn, cmd
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("ManageConn")
Set cmd = Server.CreateObject("ADODB.Command")
cmd.CommandType = adCmdStoredProc
cmd.ActiveConnection = conn
cmd.CommandText = "spUpdSponsoring"
cmd.Parameters.Append cmd.CreateParameter("Text", adVarWChar, adParamInput, 4000, Text)
cmd.Parameters.Append cmd.CreateParameter("EventsText", adVarWChar, adParamInput, 4000, EventsText)
cmd.Execute
Set cmd = Nothing
Conn.Close
Set Conn = Nothing
End Sub
Any help or suggestions appreciated.