in reply to Syntax errors with Win32::ODBC?

Well yes, you have a problem assigning to the scalar $SqlStatement (among other things, please check out CGI).

For this particular problem, you're need to quote the statement correctly. You're missing the initial quote.

$SqlStatement = "insert into people values('" . $FORM_DATA{'first_name'} . "','" . $FORM_DATA{'last_name'} . "','" . $currentdate . "')";

Here I just took the simplistic approach with the string concat operator "." but you could use heredocs. Also you may want to look at DBI's quote method or placeholders so you don't have to do the database single quoting.

-derby

Replies are listed 'Best First'.
Re: Re: Syntax errors?
by CodeNewbie (Initiate) on May 16, 2002 at 20:06 UTC
    Thank you to those who replied - I looked at the CGI link suggested by derby and will be doing some reading tonight - I appreciate the help and direction!