Hi,

A better way to do this would be to use prepared statements:

PreparedStatement pstmt = con.prepareStatement(
   "insert into LINKS (VALUE, NAVIGATION_TEXT) values(?,?))";
pstmt.setString(1, url);
pstmt.setString(2, favName);
pstmt.executeUpdate();

I'm not sure what is wrong with your sql... try inserting it manually
using your preferred sql client and see how you go.

cheesr
dim

On Sat, 22 Sep 2001 [EMAIL PROTECTED] wrote:

> Hello All,
> 
> I am trying to insert two values into a access database from a
> Servlet. The values are form variables consisting of a URL and a name.
> I'm getting the following error:
> 
> SQL Exception Caught: [Microsoft][ODBC Microsoft Access Driver] Syntax
> error in INSERT INTO statement.
> 
> If anyone can help with this I appreciate it very much.  I have
> attached the Servlet source code.
> 
> Thanks, Brian
> 




Reply via email to