aspose file tools
The moose likes JDBC and the fly likes insert into method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "insert into method" Watch "insert into method" New topic
Author

insert into method

Kingsley Mullers
Ranch Hand

Joined: Jan 14, 2005
Posts: 48
Hi there, i've written the following method to pass values and insert them into a database, it doesn't seem to work, can't see where i've gone wrong..thanks



many thanks

[edited to add code tags]
[ August 24, 2005: Message edited by: Jeanne Boyarsky ]
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Do you have any exception?

What is this?
DBconn=cn;


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Kingsley Mullers
Ranch Hand

Joined: Jan 14, 2005
Posts: 48
DBconn is connection,

error: return type incorrect...
What i'm confused about... is it supposed to return insertcomplainantDetails or should the return type be null?
vikassheel gupta
Ranch Hand

Joined: Aug 02, 2005
Posts: 53
hi
try this
public void mehtod name
and remove the return null;
this statement because i think insert statement will not return any thing thats why this problem occurs
fine


Warm Regards<br />vikassheelgupta<br />9911005168
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: insert into method
 
Similar Threads
can a batch have multiple prepared statements
new to JDBC. Please help !
Trouble with INSERT
issue with jdbc batch
howto modify database structure ?