S
Steven M. Britton
I'm at a loss as to why this isn't working. I'm building an SQL string from
a dump out of a lotus notes database. I am getting an error message that
says "Syntax error in string in query expression". - My confusion is if I
paste the statement out of the immediate window into a query and hit "!" -
run - it appends the data, but using db.execute theres an error??? Help
Yes, there is a big space between the information.
Code below:
strSQL = "INSERT INTO tblECNs ([Title], [Authors], [Suggester],
[ECN_Number], [Model_Year], [Reason], [Description]) " _
& "VALUES ('" & strECN_Title & "', '" & strAuthors & "', '"
& strSuggester & "', '" & strECN_Number & "', '" & strModel_Year & "', '" &
strReason & "', '" & strDescription & "');"
db.Execute strSQL
INSERT INTO tblECNs ([Title], [Authors], [Suggester], [ECN_Number],
[Model_Year], [Reason], [Description]) VALUES ('Exhaust Support', 'Ronnie
Gonzales', 'Steve Parker Mercury Marine', '9802', '2004', 'Quality', 'To
prevent the intrusion of water in the Gasoline engines a exhaust mount board
will be added to the Bill of Materials and Documentation. This will aid in
the proper flow and prevent the exhaust from sagging. This will add 3.6 ft of
seaboard to the bom. 2 ea. of P/N 1701887 @ 40" in length will be deleted
from the BOM and P/N 127681 muffler mount boards will also be deleted.
C 200 Plastic Sheet, HDPE 3/4" x 3/4"
9.180');
a dump out of a lotus notes database. I am getting an error message that
says "Syntax error in string in query expression". - My confusion is if I
paste the statement out of the immediate window into a query and hit "!" -
run - it appends the data, but using db.execute theres an error??? Help
Yes, there is a big space between the information.
Code below:
strSQL = "INSERT INTO tblECNs ([Title], [Authors], [Suggester],
[ECN_Number], [Model_Year], [Reason], [Description]) " _
& "VALUES ('" & strECN_Title & "', '" & strAuthors & "', '"
& strSuggester & "', '" & strECN_Number & "', '" & strModel_Year & "', '" &
strReason & "', '" & strDescription & "');"
db.Execute strSQL
INSERT INTO tblECNs ([Title], [Authors], [Suggester], [ECN_Number],
[Model_Year], [Reason], [Description]) VALUES ('Exhaust Support', 'Ronnie
Gonzales', 'Steve Parker Mercury Marine', '9802', '2004', 'Quality', 'To
prevent the intrusion of water in the Gasoline engines a exhaust mount board
will be added to the Bill of Materials and Documentation. This will aid in
the proper flow and prevent the exhaust from sagging. This will add 3.6 ft of
seaboard to the bom. 2 ea. of P/N 1701887 @ 40" in length will be deleted
from the BOM and P/N 127681 muffler mount boards will also be deleted.
C 200 Plastic Sheet, HDPE 3/4" x 3/4"
9.180');