[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Missing post? - see this post about spam for more information.
Prepaired Statement  XML
Forum Index » J2EE Application Development
Author Message
McPete

Newbie

Joined: 04/25/2006 09:13:33
Messages: 8
Offline

Quick question this time

Could someone please tell me the correct syntax for making a Prepaired statement. I need to insert an int (i) into the sql, as well as sort by alphabetical order.

This is what I figured it should be:

tfecw

Newbie

Joined: 09/19/2005 15:02:20
Messages: 144
Location: No. VA.
Offline

Check out this link Prepared Statements

Also, I *think* your code should work, provided you change this



to this



Check out the link and let us know what hang ups you are having, error messages, logic errors, etc
aim icon
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 884
Location: Superior, CO, USA
Offline

Also, you may want to simplify things a bit if you're using PreparedStatements. It takes a little more code but, especially if you start dealing with Strings, it makes your life much simpler.

Something instead like:

This message was edited 3 times. Last update was at 04/28/2006 08:37:58


Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
McPete

Newbie

Joined: 04/25/2006 09:13:33
Messages: 8
Offline

Thanks guys.

Can't believe I left the "+" out

The connection is being dealt with in another class, so I think I can get away with it as it is...we shall see
 
Forum Index » J2EE Application Development
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2012 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle