× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Chuck,

That does not look like a proper URL for connecting to a SQL server database. This is what you have, and it looks wrong to me:

java:jdbc:sqljdbc.jar:192.168.1.21:1433

For some reason, you've removed the "sqlserver" keyword, and replaced it with the name of your JAR file. That doesn't make any sense, as the name of your JAR file has nothing to do with connecting to a server. The JAR file belongs in the CLASSPATH -- it does not belong in the URL!!

I'm expecting your URL to look like this:

jdbc:sqlserver://192.168.1.21:1433


Also you have an equal sign in your JDBC properties. This is also wrong -- though, you aren't getting far enough in the process for these to cause a problem for you, yet. But this is what you have:

prop = JDBC_Properties();
JDBC_setProp(prop: 'databaseName=': 'database name');
JDBC_setProp(prop: 'user=' : 'domain name\user');
JDBC_setProp(prop: 'password=' : 'password');

The equal signs are changing the names of the properties. They will cause the process to fail. why did you add them? None of my examples do that! They should look like this:

prop = JDBC_Properties();
JDBC_setProp(prop: 'databaseName': 'database name');
JDBC_setProp(prop: 'userName' : 'whatever the user is');
JDBC_setProp(prop: 'password' : 'password');

Also, as I said before (in the message you quoted back when you replied) I do not recommend using the Microsoft JDBC driver. It does not work nicely. Please consider using the jTDS one instead.

-SK



On 12/17/2012 4:57 PM, Graves, Chuck wrote:
I too am trying to access the SQL server using the MSSQLTEST routines. After applying a full set of cumulative PTF's, downloading the JAVA (5722JV1) options 10 & 11, then applying the Java Group PTF's, and finding out how to get the iSeries to use a different version of the JVM, I have finally gotten past all the "Invalid ClassDefinition" errors etc. and the program runs, however all I get is the "Unable to Connect." Error message. When I run in debug (code snippet below)

prop = JDBC_Properties();
JDBC_setProp(prop: 'databaseName=': 'database name');
JDBC_setProp(prop: 'user=' : 'domain name\user'); (I've also tried it with just the user name without the domain name)
JDBC_setProp(prop: 'password=' : 'password');

(Prop Values changed to protect the innocent)

conn = JDBC_ConnProp('com.microsoft.sqlserver.jdbc.SQLServerDriver'
:'java:jdbc:sqljdbc.jar:192.168.1.21:1433'
: prop );


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.