K
Klic
I use SQL View to test SQL Statements before I use them in my VB code.
What I want to do is add a row to an existing table:
Table Name: Client
Field 1: AccountNumber (Numeric)
Field 2: ClientName (Text)
Field 3: Address1 (Text)
Field 4: Address2 (Text)
Field 5: Address3 (Text)
Field 6: ContactNumber (Text)
The following SQL works fine from within code (when " are replaced with "");
INSERT INTO Client ( AccountNumber, ClientName, Address1, Address2,
Address3, ContactNumber )
VALUES (123456, "Test Client", "Addr 1", "A2", "A3", "01302 781423");
but will not work from the SQL View panel - instead I get the 'Select
Source' dialog.
(Here is the code that works from within my VB)
strSQL = "INSERT INTO Client ( AccountNumber, ClientName, Address1,
Address2, Address3, ContactNumber ) " & _
"VALUES (123456, ""Test Client"", ""Addr 1"", ""A2"",
""A3"", ""01302 781423"");"
Set rcsClient = gcnxPPP.Execute(strSQL)
Set rcsClient = Nothing
I would be grateful if someone can tell me why the 'Select Source' dialog
appears, and how (if it's possible) I can use the SQL View to run
thanks,
Keith
What I want to do is add a row to an existing table:
Table Name: Client
Field 1: AccountNumber (Numeric)
Field 2: ClientName (Text)
Field 3: Address1 (Text)
Field 4: Address2 (Text)
Field 5: Address3 (Text)
Field 6: ContactNumber (Text)
The following SQL works fine from within code (when " are replaced with "");
INSERT INTO Client ( AccountNumber, ClientName, Address1, Address2,
Address3, ContactNumber )
VALUES (123456, "Test Client", "Addr 1", "A2", "A3", "01302 781423");
but will not work from the SQL View panel - instead I get the 'Select
Source' dialog.
(Here is the code that works from within my VB)
strSQL = "INSERT INTO Client ( AccountNumber, ClientName, Address1,
Address2, Address3, ContactNumber ) " & _
"VALUES (123456, ""Test Client"", ""Addr 1"", ""A2"",
""A3"", ""01302 781423"");"
Set rcsClient = gcnxPPP.Execute(strSQL)
Set rcsClient = Nothing
I would be grateful if someone can tell me why the 'Select Source' dialog
appears, and how (if it's possible) I can use the SQL View to run
thanks,
Keith