Thanks for the quick answer this morning.
I'm trying to execute a SQL statement from within
Visual Basic for MS Access. I have RTFM, the online
help is either incredibly dumbed down or arcane and
I'm trying to assemble the statement by concatenating
strings and passing the lot to DoCmd.RunSQL
I'm getting a syntax error but I can't find it.
Here is my code:
Private Sub SendUpdate_Click()
' Code to put the contents of the fields into the
' Embedded SQL statement
' Simeon Veldstra, BIM-Ltd 2000
Dim ConnectString As String
Dim SQLStatement As String
ConnectString = Chr$(34) & "ODBC;" & Chr$(34) & "
SQLStatement = "INSERT INTO sim IN " &
SQLStatement = SQLStatement & " (motorcycle,
displacement, make, model, color, year) "
SQLStatement = SQLStatement & " VALUES ( " &
Me!motorcycleIn & ", " & Me!displacementIn & ", "
SQLStatement = SQLStatement & Me!makeIn & ", " &
Me!modelIn & ", " & Me!colorIn & ", " & Me!yearIn & ")
'Put string into window so I can check it
Me!SQLWindow = SQLStatement
All the &'s evaluate to:
INSERT INTO sim IN "ODBC;" [DSN=testdb;]
(motorcycle, displacement, make, model, color, year)
VALUES ( Little Red, 70, Honda, C70, red, 1982)
(newlines added for clarity)
The examples in the online help all interface to other
I am running 7.0.2 on linux
Thanks in advance for any help
--Failure is not an option, it comes bundled with your
Do You Yahoo!?
Get your free @yahoo.ca address at http://mail.yahoo.ca
pgsql-novice by date
|Next:||From: David Lloyd-Jones||Date: 2000-08-01 00:03:52|
|Subject: Presenting PGAccess Pages to the WWW.|
|Previous:||From: Lamar Owen||Date: 2000-07-31 18:54:44|
|Subject: Re: PSQL Working, but PGAccess Not Connecting.|