Click to See Complete Forum and Search --> : Passing Values of Recordsets in an INSERT statement...


Rashar
04-13-2004, 12:44 PM
Good afternoon,

How do you pass a recordset value in an INSERT statement. I've tried so many ways and still can not get the right query...

Thanks in advance.

This is what I've tried so far...



RS1.Open "INSERT INTO TBLRESPONSES (question1) VALUES &rs("Question")&" adoConn, 3,3



RS1.Open "INSERT INTO TBLRESPONSES (question1) VALUES &rs('"Question"')&" adoConn, 3,3



RS1.Open "INSERT INTO TBLRESPONSES (question1) VALUES rs('"&Question&"'), "adoConn, 3,3

CardboardHammer
04-13-2004, 12:57 PM
I don't do PHP, but it looks like you don't have the quotes in the right places. Try this:


RS1.Open "INSERT INTO TBLRESPONSES (question1) VALUES (" & rs("Question") & ")", adoConn, 3,3

Rashar
04-13-2004, 01:08 PM
Thanks for the Reply CardboardHammer... I think this will work.

Rashar