java.sql.SQLException on Connection creation
Jim Urban
jim.urban at netsteps.net
Fri Aug 17 09:04:05 EDT 2001
Greg,
Attached is a standalone Java app you can test with. You will need to make
a couple of quick changes to it:
1. Change the line String url
="jdbc:freetds:sqlserver://localhost/mydatabase"; to point to the your
database server and database.
2. Replace the literal with a valid DB id in the line: String login =
"USERID";.
3. Replace the literal with a valid DB password in the line: . String
password = "PASSWORD";.
Then recompile the program: javac TestFreeTDS.java.
Run the program: java -classpath .;\FreeTDS\freetds_jdbc.jar TestFreeTDS
(be sure to set your classpath correctly).
Good luck!
Jim Urban
Product Manager
Netsteps Inc.
Suite 505E
1 Pierce Pl.
Itasca, IL 60143
Voice: (630) 250-3045 x2164
Fax: (630) 250-3046
-----Original Message-----
From: bounce-freetds-134788 at franklin.oit.unc.edu
[mailto:bounce-freetds-134788 at franklin.oit.unc.edu]On Behalf Of Leon
Chakmakian
Sent: Thursday, August 16, 2001 10:17 PM
To: TDS Development Group
Subject: [freetds] Re: java.sql.SQLException on Connection creation
Okay, so here's my status. I tried the snapshot.jar file and I got a
different error: No suitable driver found. I later tried re-downloading the
file again just to make sure I didn't get a corrupt copy of the file and
that didn't work. I tried to make a standalone java app, but I'm not sure
how to do that; I come from a JSP type of application background. If you
could send me a small sinipit of code to try out as a java app, I could test
it that way. I feel like I'm doing something wrong that is really simple.
I'm using Tomcat as my JSP engine and have the jar file in my tomcat/lib
directory with is specified in my path. Any other ideas? Further below is
the error I am getting
-greg
java.sql.SQLException
at
com.internetcds.jdbc.tds.Constructors.newConnection(Constructors.java:305)
at com.internetcds.jdbc.tds.Driver.connect(Driver.java:257)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
On Thursday, August 16, 2001, at 09:24 AM, Curt Hagenlocher wrote:
Should I be using the freetds_jdbc.snapshot.jar file
instead?
Yes, probably, though I don't know that it would make a difference
in this case.
I'm not really sure where to go next.
I haven't tried it outside of my JSP environment mainly because I
don't have anything to try it out on. Any ideas?
Create a small source file with a main() function that does
nothing more than try to make a connection. Build that and
try to run it outside the JSP context and see if you get the
same error.
Which JSP environment are you using?
--
Curt Hagenlocher
curt at hagenlocher.org
---
You are currently subscribed to freetds as: [gregchak at mac.com]
To unsubscribe, forward this message to
$subst('Email.Unsub')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/freetds/attachments/20010817/f9d6e189/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestFreeTDS.java
Type: application/octet-stream
Size: 1771 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20010817/f9d6e189/attachment.obj
More information about the FreeTDS
mailing list