I'm not sure if this is possible..... but here's what I'm trying to do...
I have declared several variables (see code below) and then am trying to assign values to them in a loop. The values are being pulled from the database successfully, but then the code is not working when I try to assign them the values. What am I doing wrong??
I'd appreciate any suggestions....
Thanks!
I have declared several variables (see code below) and then am trying to assign values to them in a loop. The values are being pulled from the database successfully, but then the code is not working when I try to assign them the values. What am I doing wrong??
Code:
Response.Buffer = True
Dim conn
Dim rs
Dim strSql
Dim dbPath
Dim intTemp
Dim strNT1, strNT2, strNT3
Dim strNL1, strNL2, strNL3
Dim strCAT1, strCAT2, strCAT3, strCAT4
Dim strCAL1, strCAL2, strCAL3, strCAL4
intTemp = 1
dbPath = "D:\hosting\********\access_db\***.mdb"
'============================
'Open Database Connection
'============================
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & dbPath
Set rs = Server.CreateObject("ADODB.Recordset")
strSql = "SELECT * FROM tblLinks WHERE Type = 'News';"
rs.Open strSql, conn, 1
If Not rs.EOF Then
rs.MoveFirst
Do While Not rs.EOF
[B]strNT & intTemp = rs("Text")
strNL & intTemp = rs("Link")[/B]
intTemp = intTemp + 1
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
I'd appreciate any suggestions....
Thanks!