File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

updating tables using variables..

 
liverpool alan
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanz for that......
Alan
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic