-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Muhammad Salman wrote:
I am using the official type 4 mysql driver from
www.mysql.com but unable to make a remote connection
with the mysql database running on our companie's
remote server. I mailed some mailing mailing lists but
didnt find out the right answer yet. I am using the
following code for simple remote connection test:
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection con =
DriverManager.getConnection("jdbc:mysql://66.137.7.185:3306/prefill","prefill","jeem");
out.println("Testing Database Connectivity");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from
state");
int i = 0;
while(rs.next() && i < 10)
{
out.println("<h2> Output: "+rs.getString(2) +
"</h2>");
i ++;
}
rs.close(); stmt.close();
con.close();
Your quick response will be highly appreciated.

You need to tell us what the error you're receiving is, otherwise we can't be of much help.

-Mark


- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9+MnBtvXNTca6JD8RAkxBAJ9tZD8OF6XByll9AW7IPabqMBZbiQCfdx4g
0lK6FUi8jP331x9czJqqK/E=
=kn1O
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to