| Author |
SQL Error :Too few parameters.
|
Padmaja Godbole
Greenhorn
Joined: May 10, 2003
Posts: 14
|
|
I am running the following query from my java program : select * from OtherValues where StructureID = 0 and (DPID is null or DPID=""); I am getting error : java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. Although the query running fine in Access directly. pls suggest.. Thanks in advance.
|
Padmaja Godbole<br />---------------------<br />SCJP2
|
 |
Padmaja Godbole
Greenhorn
Joined: May 10, 2003
Posts: 14
|
|
double quotes was the problem , I changed the query and now its working. select * from OtherValues where StructureID = 0 and (DPID is null or DPID='');
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
|
Welcome to JavaRanch, Padmaja, and thanks for sharing what you learned. Hope to see you 'round the Ranch!
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
 |
|
|
subject: SQL Error :Too few parameters.
|
|
|