Hello,
I'm ripping info out of a database and I want to loop through all the field names in each record replacing ' with '', but I don't seem to be able to get the key names into an array. I've tried this:
Set Conn = server.CreateObject ("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & dbpath & ";"
set RS=Conn.execute("select * from depts"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
do until RS.EOF
for each keyname in RS.keys
RS(keyname) = Replace(RS(keyname), "'", "''", 1, -1, 1)
next
'Do some stuff with the row here
loop
but I get an error saying "Object does not support this property or method 'RS.KEYS'"
I've tried looping though as an array as well, but that didn't work. Can anyone help? C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
I'm ripping info out of a database and I want to loop through all the field names in each record replacing ' with '', but I don't seem to be able to get the key names into an array. I've tried this:
Set Conn = server.CreateObject ("ADODB.Connection"
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & dbpath & ";"
set RS=Conn.execute("select * from depts"
do until RS.EOF
for each keyname in RS.keys
RS(keyname) = Replace(RS(keyname), "'", "''", 1, -1, 1)
next
'Do some stuff with the row here
loop
but I get an error saying "Object does not support this property or method 'RS.KEYS'"
I've tried looping though as an array as well, but that didn't work. Can anyone help? C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!