| Author |
Converting String to ResultSet
|
Shweta Grewal
Ranch Hand
Joined: Apr 03, 2012
Posts: 39
|
|
Hi all,
Is it possible to convert String to ResultSet? Is there any function for this conversion?
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 2542
|
|
|
If the String is a valid SQL query, then maybe. Otherwise, no. What exactly are you trying to do?
|
 |
Shweta Grewal
Ranch Hand
Joined: Apr 03, 2012
Posts: 39
|
|
If the String is a valid SQL query, then maybe
Can you elaborate a little bit.
Actually I am giving sql query as a string and getting the result as string, I want to convert thisString result to ResultSet.
Is it possible?
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 2542
|
|
|
The normal process is: get a JDBC connection to your database, use it to create a statement, use the statement to execute a query. That process returns a ResultSet. How are you running a query and getting back a String? Could you post a code sample?
|
 |
Wendy Gibbons
Bartender
Joined: Oct 21, 2008
Posts: 1098
|
|
|
Why do you want a ResultSet?
|
 |
 |
|
|
subject: Converting String to ResultSet
|
|
|