Skip to main content
Inspiring
July 20, 2006
Question

Anyone know whats wrong wit hthis insert into

  • July 20, 2006
  • 1 reply
  • 252 views
commInsert.Execute("INSERT INTO customers(firstname,lastname) VALUES('" +
Replace(Command1__varOne, "'", "''") + "', '" + Replace(Command1__varTwo,
"'", "''") + "', " + Replace(Command1__varThree, "'", "''") + ") " ' Execute
the insert command

Getting this error

Microsoft VBScript compilation (0x800A03EE)
Expected ')'
commInsert.Execute("INSERT INTO customers(firstname,lastname) VALUES('" +
Replace(Command1__varOne, "'", "''") + "', '" + Replace(Command1__varTwo,
"'", "''") + "', " + Replace(Command1__varThree, "'", "''") + ") " ' Execute
the insert command
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--------------------------------------------------------------^
Ta

Andy


This topic has been closed for replies.

1 reply

Participating Frequently
July 21, 2006
Can't tell exactly, since your lines are wrapping here in the forum. Howeve, the error message says it is expecting a close-paren, and you have an uneven number of parens in your code, so that would be my guess.

The carat should be pointing to the position at which the vbscript compiler was expecting the close-paren.