Here is the error message I got in console:
"The name 'LItem' is illegal in this context.
Only constants, constant expressions, or variable allowed here.
Column names are illegal."

Ting

-----Original Message-----
From: Geert Van Damme [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 05, 2000 9:52 AM
To: [EMAIL PROTECTED]
Subject: RE: insert data


Of course you get no error.
You throw away the info in your catch clause.
Please, try to write the error info somewhere (easiest is System.out)
System.out.println(e.getMessage());

and let us know the error message.

Geert Van Damme

> -----Original Message-----
>     public void doInsert()throws
>            ClassNotFoundException, InstantiationException,
>            IllegalAccessException{
>     try{
>
>        SybDriver sybDriver = (SybDriver)
>        Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
>
>        Properties SysProps = new Properties();
>        SysProps.put("user","dbuser");
>        SysProps.put("password","");
>        String url = "jdbc:sybase:Tds:165.122.250.28:5000/stm";
>        Connection con = DriverManager.getConnection(url,SysProps);
>
>        Statement stmt = con.createStatement();
>        stmt.executeUpdate("insert OfficeSupply values "+
>                 "(this.LItem,this.Lquan,this.Lprice,0)");
>                 con.close();}
>      catch (SQLException e){
>            e.getMessage();}
>
>          }
>  }

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to