tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbayar" <>
Subject RE: another sql error
Date Fri, 13 Sep 2002 08:33:17 GMT
try use Statement

String vno = request.getParameter("vergino");
String Query="Select malik.VerginNo From ParselMalik Where Malik.VergiNo=?";
PreparedStatement st=mysql.prepareStatement(Query);

-----Original Message-----
From: Halil AKINCI []
Sent: Friday, September 13, 2002 4:14 PM
To: Tomcat Users List; servlet-interest group; jakarta-tomcat yahoo
Subject: another sql error

Hi all ,

When I want to run following sql statement  in a servlet, I receive
following error message  in tomcat's DOS console

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

In this sql statement, the "vno" variable is read from a HTML form by using
following statement

String vno = request.getParameter("vergino");

Other informations are gotten from MS Access tables (Malik, ParselMalik,
KatMalik tablolarýndan). This sql statement is running correct within the
access. I wonder how can I organize this sql? Can anyone help?

e " +
        "FROM ParselMalik,Malik WHERE Malik.VergiNo="+vno+" AND
Malik.VergiNo=ParselMalik.VergiNo " +
         "UNION SELECT
" +
         "FROM KatMalik,Malik WHERE Malik.VergiNo="+vno+" AND

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message