aspose file tools*
The moose likes JDBC and the fly likes updating tables using variables.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "updating tables using variables.." Watch "updating tables using variables.." New topic
Author

updating tables using variables..

liverpool alan
Greenhorn

Joined: Nov 08, 2000
Posts: 18
Hi again,
Just wondering if any of you guys know anything about passing a variable into an SQL statement....e.g...
INSERT INTO TEST Data ( 1, ""+variable , 'Thursday', 1, 5 )
Can anybody clarify whether this is even possible (in any shape or form)???
Thanks,
alan
hemanth kumar
Ranch Hand

Joined: Mar 15, 2001
Posts: 55
Originally posted by liverpool alan:
Hi again,
Just wondering if any of you guys know anything about passing a variable into an SQL statement....e.g...
INSERT INTO TEST Data ( 1, ""+variable , 'Thursday', 1, 5 )
Can anybody clarify whether this is even possible (in any shape or form)???
Thanks,
alan

"insert into test values (1,'" + variable +"','Thursday',1,5)"
liverpool alan
Greenhorn

Joined: Nov 08, 2000
Posts: 18
Thanz for that......
Alan
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Alan,
Not to get technical but your name does not appear to follow the guidelines required for names on JavaRanch. When you registered you agreed to use a first name and last name and not use an obviously ficticious name. I must ask you to re-register with your real name. Thanks.
------------------
Moderator of the JDBC Forum


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
wood burning stoves
 
subject: updating tables using variables..