Hi all,
I looked back and forth, still don't know why I get this ERROR:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.
and the line that it specifies is
here is my code,
Thanks in advance.
I looked back and forth, still don't know why I get this ERROR:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.
and the line that it specifies is
Code:
Set rs1 = objConn.Execute(sql2)
here is my code,
Code:
sql = "SELECT DISTINCT(ProductID) FROM tblSupports"
Set rs = objConn.Execute(sql)
Do while not rs.eof
sql2 = "SELECT * FROM tblSupports WHERE ProductID = " & rs("ProductID")
Set rs1 = objConn.Execute(sql2)
sqlADD = "INSERT INTO tblSupports2(ManuID, HardwareID, CatID, ProductID, " _
& " FAQ, Answer, Specsheet, Manual, Demo, Driver, Utility, Firmware" _
& ") VALUES (" _
& rs1("ManuID") & " ," _
& rs1("HardwareID") & " ," _
& rs1("Category") & " ," _
& rs1("ProductID") & " ," _
& "'" & rs1("FAQ") & "'," _
& "'" & rs1("Answer") & "'," _
& "'" & rs1("SpecsheetFileName")& "'," _
& "'" & rs1("ManualFileName") & "'," _
& "'" & rs1("DemoFileName") & "'," _
& "'" & rs1("DriverFileName") & "'," _
& "'" & rs1("Utility") & "'," _
& "'" & rs1("Firmware") & "' " _
& ")"
objConn.Execute sqlADD
rs.movenext
loop
call closeRS(rs)
call closeRS(rs1)
Thanks in advance.