ADO Limitations? 
Author Message
 ADO Limitations?

    I'm using ASP and ADO to update a SQL 7 table.  I open a connection to
the database and then create a ado.command.  I then set it as a StoredProc
type and insert parameters.  It seems I have run into a limit of how many
characters I can pass.  Has anyone else had this problem and do you have a
fix for it?  Just in case, I'll leave an example of the source. Please help.
Thanks.

Ryan Scott

function saveJob(iden, jobsCatIden, cityIden, locDesc, posTitle, posDesc,
posReq, posComments)
  set oConn = server.createObject("ADODB.connection")
  set rs = server.createObject("ADODB.recordSet")
  set cmd = server.createObject("ADODB.command")

  oConn.open connectString

  cmd.ActiveConnection = oConn
  cmd.CommandText = "webUpdateJob"
  cmd.CommandType = 4   ''adCmdStoredProc

  cmd.Parameters(1).value = iden
  cmd.Parameters(2).Value = jobsCatIden
  cmd.Parameters(3).Value = cityIden
  cmd.Parameters(4).Value = unescape(locDesc)
  cmd.Parameters(5).Value = unescape(posTitle)
  cmd.Parameters(6).Value = unescape(posDesc)
  cmd.Parameters(7).Value = unescape(posReq)
  cmd.Parameters(8).Value = unescape(posComments)

  set rs = cmd.Execute



Sun, 11 May 2003 03:00:00 GMT  
 ADO Limitations?
I've never ran into a problem with the number of characters passed.

Are you trying to retrieve any data or just update.  If just updating why go
to the
trouble of creating a recordset when you don't need one.

I use this:

<!--#include file="dbConnection.asp"-->

<%
    option explicit

Dim objCmd
Dim IsComplete

objCmd = Server.CreateObject("ADODB.Command")
with objCmd

.ActiveConnection = objConn
.CommandType    = adCmdStoredProc
.CommandText     = "WebUpdateJob"
.Command.Parameters.Append objCmd.Parameters("return", adInteger,
adParamReturnValue, 4)

AdParamInput, 10, iden)

AdParamInput, 10, jobsCatIden)

AdParamInput, 2, cityIden)

AdParamInput, 50, unescape(locDesc))

AdParamInput, 50, unescape(posTitle))

AdParamInput, 150, unescape(posDesc))

AdParamInput, 150, unescape(posReq))

AdParamInput, 250, unescape(posComments))
End With

objCmd.Execute

'Get the return value from stored proc.
IsComplete = objCmd.Parameters("return").value

If isComplete <> 0 Then
        Response.Write("Update Complete!")
 Else
        Response.Write("Update Failed!")
End If

**********************************************************************
I always use Return(1) to confirm my stored procedure completed

I have passed as many as 12 parameters to a stored procedure without any
problems.

SYNTAX is


[Type of Input], [Size],[MyVariableName] )

Check out these articles for more:

http://www.4guysfromRolla.com/webtech/010600.shtml

http://www.asptoday.com/articles/20000619.htm

http://www.aspfaq.com/faq/sp.asp

Did this make sense at all?

: - )   Jay



Quote:
>     I'm using ASP and ADO to update a SQL 7 table.  I open a connection to
> the database and then create a ado.command.  I then set it as a StoredProc
> type and insert parameters.  It seems I have run into a limit of how many
> characters I can pass.  Has anyone else had this problem and do you have a
> fix for it?  Just in case, I'll leave an example of the source. Please
help.
> Thanks.

> Ryan Scott

> function saveJob(iden, jobsCatIden, cityIden, locDesc, posTitle, posDesc,
> posReq, posComments)
>   set oConn = server.createObject("ADODB.connection")
>   set rs = server.createObject("ADODB.recordSet")
>   set cmd = server.createObject("ADODB.command")

>   oConn.open connectString

>   cmd.ActiveConnection = oConn
>   cmd.CommandText = "webUpdateJob"
>   cmd.CommandType = 4   ''adCmdStoredProc

>   cmd.Parameters(1).value = iden
>   cmd.Parameters(2).Value = jobsCatIden
>   cmd.Parameters(3).Value = cityIden
>   cmd.Parameters(4).Value = unescape(locDesc)
>   cmd.Parameters(5).Value = unescape(posTitle)
>   cmd.Parameters(6).Value = unescape(posDesc)
>   cmd.Parameters(7).Value = unescape(posReq)
>   cmd.Parameters(8).Value = unescape(posComments)

>   set rs = cmd.Execute



Sun, 11 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO/Combo box limitations

2. ADO Row Size Limitation?

3. ADO fields limitation

4. ADO String Limitation.

5. ado 2.6 stream limitation?

6. ADO ADO ADO ADO ADO VB examples / samples book wanted

7. VBscript, ADO on windows 2000 is faster than C++ ATL, ADO

8. ADO for SQL - ADO for Access ?

9. ADO Control against ADO 2.1 and ADO 2.0

10. LIMITATIONS OF POSTSCRIPT INTERPRETER IN MATHEMATICA?

11. VM and operand stack limitations

12. limitations on out parameters

 

 
Powered by phpBB® Forum Software