MS SQL Server access using Java?
- Pecos
-
Pecos
- Member since: Dec. 29, 1999
- Offline.
-
- Forum Stats
- Member
- Level 03
- Blank Slate
Does anyone know how to access Microsoft SQL Server using Java? Is there a direct JDBC option? Or is the JDBC-ODBC brige (which costs money) the only way to do it?
I gotta get this shit connected at work (for free) and i don't know how. any ideas?
- aladinsane
-
aladinsane
- Member since: Jan. 17, 2000
- Offline.
-
- Forum Stats
- Member
- Level 21
- Blank Slate
At 7/2/01 11:31 AM, MassiveBit wrote: Does anyone know how to access Microsoft SQL Server using Java? Is there a direct JDBC option? Or is the JDBC-ODBC brige (which costs money) the only way to do it?
I gotta get this shit connected at work (for free) and i don't know how. any ideas?
I was faced with a similar problem a while ago and I couldn't find an easy way to do it, but I don't know a lot about Java. I just wrote a PHP script to connect to the database, get the data I need and then write it to a text file which can be read by a Java applet.
It's a bit of a bodge but it works OK for me.
- Pecos
-
Pecos
- Member since: Dec. 29, 1999
- Offline.
-
- Forum Stats
- Member
- Level 03
- Blank Slate
At 7/2/01 12:41 PM, aladinsane wrote:At 7/2/01 11:31 AM, MassiveBit wrote: Does anyone know how to access Microsoft SQL Server using Java? Is there a direct JDBC option? Or is the JDBC-ODBC brige (which costs money) the only way to do it?I was faced with a similar problem a while ago and I couldn't find an easy way to do it, but I don't know a lot about Java. I just wrote a PHP script to connect to the database, get the data I need and then write it to a text file which can be read by a Java applet.
I gotta get this shit connected at work (for free) and i don't know how. any ideas?
It's a bit of a bodge but it works OK for me.
Nah, that's too retarded and my company would never go for it.. and neither would I really.. :O)
thanks anywayz
- Pecos
-
Pecos
- Member since: Dec. 29, 1999
- Offline.
-
- Forum Stats
- Member
- Level 03
- Blank Slate
Just to follow up on this with another question.. I believe it's possible to access MS SQL Server using XML functions. Anyone ever heard of that or how it would work?
- digaleet
-
digaleet
- Member since: Jul. 8, 2001
- Offline.
-
- Forum Stats
- Member
- Level 01
- Blank Slate
At 7/2/01 11:31 AM, MassiveBit wrote: Does anyone know how to access Microsoft SQL Server using Java? Is there a direct JDBC option? Or is the JDBC-ODBC brige (which costs money) the only way to do it?
I gotta get this shit connected at work (for free) and i don't know how. any ideas?
Well I cant claim to be a Java guru, but I have done more than dabbled in it.... I do my Java development using IBM VisualAge for Java, it has libraries to connect to just about any kind of database, so it has never been a problem for me..... That guy may have been on to something.... Using a PHP backend for your database connectivity may not be that far fetched.... Of course I would bypass the whole text file bit :)
Mabey write a PHP script which accepts encrpyted SQL querys, and outputs an encrypted response from the SQL server.... Of course you could go deeper by writing all of your database functions in PHP..... So http://www.mysite.com/db/dbreq.php?action=Login&Username=Blah&Password=hashme may return a session ID for authenticated logins....
Just a though..... I wouldn't recomend it by any means, but it is quite possible and my not be as impractical as you think...
-Digaleet
digaleet@hackers.com
- Pecos
-
Pecos
- Member since: Dec. 29, 1999
- Offline.
-
- Forum Stats
- Member
- Level 03
- Blank Slate
At 7/8/01 02:07 PM, digaleet wrote: Mabey write a PHP script which accepts encrpyted SQL querys, and outputs an encrypted response from the SQL server.... Of course you could go deeper by writing all of your database functions in PHP..... So http://www.mysite.com/db/dbreq.php?action=Login&Username=Blah&Password=hashme may return a session ID for authenticated logins....
Just a though..... I wouldn't recomend it by any means, but it is quite possible and my not be as impractical as you think...
-Digaleet
digaleet@hackers.com
No you don't understand, I can't use PHP or any other open source tools. The company would rather use a commercial product for which they can get support. No one from the "PHP development team" is going to offer them support.
- Pecos
-
Pecos
- Member since: Dec. 29, 1999
- Offline.
-
- Forum Stats
- Member
- Level 03
- Blank Slate
Just to follow up on this post..
I found a JDBC driver that can connect directly to the SQL Server.
If anyone is interested, you can get it here.
Woohoo!

