("ADODB.RecordSet") access problem

Tech-Archive recommends: Fix windows errors by optimizing your registry



Set Conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.RecordSet")
Conn.Open CU_DSN
rs.Open "SELECT * FROM tbl_AddrChange WHERE ID=" & szID & " AND

CUNumber=" & CheckString(Session("CUNumber"),""),Conn

FUNCTION CheckString (s, endchar)
pos = InStr(s, "'")
While pos > 0
s = Mid(s, 1, pos) & "'" & Mid(s, pos + 1)
pos = InStr(pos + 2, s, "'")
Wend
CheckString="'" & s & "'" & endchar
END FUNCTION
I am working with the following code:

Set Conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.RecordSet")
Conn.Open CU_DSN
rs.Open "SELECT * FROM tbl_AddrChange WHERE ID=" & szID & " AND

CUNumber=" & CheckString(Session("CUNumber"),""),Conn

FUNCTION CheckString (s, endchar)
pos = InStr(s, "'")
While pos > 0
s = Mid(s, 1, pos) & "'" & Mid(s, pos + 1)
pos = InStr(pos + 2, s, "'")
Wend
CheckString="'" & s & "'" & endchar
END FUNCTION

The following line of code is having a problem:
"rs.Open "SELECT * FROM tbl_AddrChange WHERE ID=" & szID & " AND
CUNumber=" & CheckString(Session("CUNumber"),""),Conn"

This is code is for a server program that uses classic asp (vbscript).

A sql server 2000 databaase is used in the applcation. The above line

of code does select the correct row in the sql server 2000 table and

all the columns are selected. However,
all the values from the table is not selected. A few columns obtain

their values but the rest of the columns from the sql server 2000 table

are not obtained.
I have been trying to solve this problem for awhile. Thus, can you tell

me what could cause some rows to not be selected.
.



Relevant Pages

  • vbscript ADODB.RecordSet not returning all values selected
    ... FUNCTION CheckString (s, endchar) ... select the correct row in the sql server 2000 table and all the columns are ...
    (microsoft.public.scripting.vbscript)
  • problem with ("ADODB.RecordSet")
    ... FUNCTION CheckString (s, endchar) ... select the correct row in the sql server 2000 table and all the columns are ...
    (microsoft.public.data.oledb)
  • Re: problem with ("ADODB.RecordSet")
    ... > FUNCTION CheckString ... > sql server 2000 databaase is used in the applcation. ... > code does select the correct row in the sql server 2000 table and all ... In such case you would use the Command object, ...
    (microsoft.public.data.oledb)