> Hi,
>
> I am trying to run a webservice that uses a mysql database.  The service
> runs fine through the connection, but when I try to query the database it
> seems to die and a I get a Fault String indicating that the return object
> is null.  If an exception is thrown I would not get a null return
> object.  I am using mm.mysql-2.0.10.bin.jar package to provide my driver.
> Are there any special issues with mysql?
>
> thanks for your help,
>
> Isaac
>

I've used MySQL as a database for many of my SOAP interfaces.  I'm using the
mm.mysql-2.0.2.bin.jar package.  Here is some sample code that I use:

String driver="org.gjt.mm.mysql.Driver";
String url="jdbc:mysql://localhost/dbname?user=root";

Class.forName(driver);
connection = DriverManager.getConnection(url);

Statement statement = connection.createStatement();
String qrySelect="SELECT * FROM tablename";
ResultSet result =statement.executeQuery(qrySelect);

while (result.next()) {

--- some processing here ---

}

--- and then some clean up code here ---

I'm not sure how much help that is...



Reply via email to