vergino is a string. I tried it (if it is a string then it has to be in quotes ...) but I received same error message.
----- Original Message -----
Sent: Friday, September 13, 2002 10:23 AM
Subject: Re: another sql error

what type of field is vergino ? is it a number ? or a string ? if it is a string then it has to be in quotes ...
did you check that the parameter is not null ?
 
 
Regards
Guru
-----Original Message-----
From: Halil AKINCI [mailto:[EMAIL PROTECTED]]
Sent: 13 September 2002 08:14
To: [EMAIL PROTECTED]
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?
 
("SELECT Malik.VergiNo,Malik.Adı,Malik.Soyadı,ParselMalik.TasınmazID,ParselMalik.Hisse " +
        "FROM ParselMalik,Malik WHERE Malik.VergiNo="+vno+" AND Malik.VergiNo=ParselMalik.VergiNo " +
         "UNION SELECT Malik.VergiNo,Malik.Adı,Malik.Soyadı,KatMalik.TasınmazID,KatMalik.PayMiktarı " +
         "FROM KatMalik,Malik WHERE Malik.VergiNo="+vno+" AND Malik.VergiNo=KatMalik.VergiNo");

Reply via email to