It's not a secret anymore!
The moose likes JDBC and the fly likes Converting String to ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Converting String to ResultSet" Watch "Converting String to ResultSet" New topic
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
    
  10

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
    
  10

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting String to ResultSet
 
Similar Threads
Help with a TagExtraInfo class
How to close ResultSet in a function after returning it
Making a String[] from ResultSet
ResultSet issue with adding record
Something wrong in returning ResultSet