File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
help with a statement
Joined: Nov 08, 2002
Dec 02, 2002 04:19:00
hello i hope someone can help me please
i have this statement below.
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO Cust VALUES (?, ?)");
what i want to do is get the name of the table from
1 how would i do this?
Joined: Apr 08, 2002
Dec 02, 2002 10:26:00
Use the following :-
lStrTableName = JTextField.getText();
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO " + lStrTableName + " VALUES (?, ?)");
pstmt.setString(1, Str1);//assuming a varchar column
I agree. Here's the link:
subject: help with a statement
Help with Try-Catch-Finally statement
Prepared Statement with wild card
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015