Prabhat Dhanrajgir

+ Follow
since Oct 19, 2004
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prabhat Dhanrajgir

thanks srini...

but i have tried that also. I printed the query on console and from there copied it back to the toad and it worked.

So the query works on toad, i copy it from there into my java code it flops, and from java code or console i copy it back on toad and it works again. This is kind of a thing that defies logic.

Can u think of any other remedies...

waiting for any more suggestions
thanks adeel for the reply but that is not so as i am giving the exact query which is working in toad so the no. of values given is indeed equal to the no. of columns in the table.
hi guys...

i am using an insert query which works fine when i run it on toad and shows one row inserted. But when i use the same query in my java code using jdbc,
the purpose fails and in the logs the error comes as "not enough values" that is a SQL exception.

I am not able to comprehend that a query that works fine on toad fails in jdbc.

The code which i use is as :

String insert_val2 = "insert into listing values (a huge array of values)";
DBPSaccess dbp2 = new DBPSaccess(insert_val2);
boolean y = dbp2.insert();

i have checked there is no problem in connection or statement object.

I need help quickly guys so please pour in your suggestions

Thanking in advance.