|
|
|
|
|
| | |
|
Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Problem with passing a recordset to a procedure |
From: |
Tony |
Date: |
3/15/1999 8:55:25 PM |
IP: |
209.135.83.147 |
Dear all,
When I tried to pass a recordset to a procedure,
I received two ADO errors. The following is
what I did and what I got.
[code]
...
rsOrder.Open cmdOrder, , adOpenKeyset, adLockOptimistic
call ADOError(cnTest) 'name of connection object is "cnTest"
...
[result]
Error#=0
Error description=[Microsoft][ODBC SQL Server Driver]Cursor type changed
Error#=0
Error description=[Microsoft][ODBC SQL Server Driver]Cursor concurrency changed
The sub is:
SUB ADOError(conn)
errCount=conn.errors.count
IF errCount=0 then
exit SUB
END IF
for counter= 0 to errCount-1
errornum=conn.errors(counter).number
errordesc=conn.errors(counter).description
response.write pad & "Error#=<b>" & errornum & "</b><br>"
response.write pad & "Error description=<b>"
response.write errordesc & "</b><p>"
next
END SUB
Any suggestions?
If I don't use sub (see the code following),
there will be no problem.
[code]
---
rsOrder.Open cmdOrder, , adOpenKeyset, adLockOptimistic
Errcount=cnTest.errors.count
IF errCount<>0 then
for counter= 0 to errCount-1
errornum=cnTest.errors(counter).number
errordesc=cnTest.errors(counter).description
response.write pad & "Error#=<b>" & errornum & "</b><br>"
response.write pad & "Error description=<b>"
response.write errordesc & "</b><p>"
next
End If
...
Why? Why???
Any help is appreciated.
Tony |
Follow Up - Re: Problem with passing a recordset to a procedure - Harlan 3/16/1999 8:58:13 AM
|
|

|
|
|
|
|
|
|
|
|
|