This is a discussion on ("ADODB.RecordSet") access problem within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> 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=" ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |