Thanks Pradyut,
The package was dowloaded from micro$oft, but
apparently is not working. I would like to connect
directly to the server that way I don't need to create
the ODBC an each computer. Now let me ask you one more
question. How do you distribute a Java app? I know
that if one does a J2EE application and put it on the
server, it will be available to the users. But what I
have is a very small java app that would like to give
it to several users.
Thanks,
Manuel
--- Pradyut Bhattacharya <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>
> U can connect to sql server 200 via the odbc also
>
>
>
> In the program u have mentioned pls show us the
> package u r using,
>
> May be the package u r using may not type of
> connection u r trying to
> connect
>
> U r connecting via the server
>
>
>
> jdbc:microsoft:sqlserver://CHRIS01:1433
>
>
>
> the package may be enabling a direct connection with
> sql server
>
>
>
> a odbc program (sorry if do not want to see this)
>
>
>
>
>
> import java.sql.*;
>
> import java.util.*;
>
>
>
> class DriverApp {
>
> public static void main(String args[]) {
>
> try {
>
>
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>
> Enumeration drivers =
> DriverManager.getDrivers();
>
> System.out.println("Available drivers:
> ");
>
> while (drivers.hasMoreElements()) {
>
> Driver driver =
> (Driver)drivers.nextElement();
>
> System.out.println(" Driver:
> "+driver.getClass().getName());
>
> System.out.println(" Major
> version:
> "+driver.getMajorVersion());
>
> System.out.println(" Minor
> version:
> "+driver.getMinorVersion());
>
> System.out.println(" JDBC
> compliant:
> "+driver.jdbcCompliant());
>
>
>
> DriverPropertyInfo props[] =
> driver.getPropertyInfo(" ",
> null);
>
> if (props !=null) {
>
> System.out.println("
> Properties ");
>
> for (int i = 0; i<props.length;
> ++i) {
>
> System.out.println("
> Name:
> "+props[i].name);
>
> System.out.println("
> Description:
> "+props[i].description);
>
> System.out.println("
> Value:
> "+props[i].value);
>
> if (props[i].choices !=null)
> {
>
> System.out.println("
> Choices: ");
>
> for (int j=0;
> j<props[i].choices.length; ++j)
>
> System.out.println("
> "+props[i].choices[j]);
>
> }
>
> System.out.println("
> Required:
> "+props[i].required);
>
> }
>
> }
>
> }
>
> } catch(Exception ex) {
>
> System.out.println(ex);
>
> System.exit(0);
>
> }
>
> }
>
> }
>
>
>
>
>
> For creating a data source goto control panel>
> administrative tools>data
> sources>add a user dsn and select sql server.
>
>
>
>
>
> thanks
>
> Pradyut
> <http://pradyut.tk/> http://pradyut.tk
> <http://groups.yahoo.com/group/d_dom/>
> http://groups.yahoo.com/group/d_dom/
> <http://pradyut.50megs.com/>
> http://pradyut.50megs.com
> India
>
> _____
>
> From: manuel tejada
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 23, 2004 11:00 PM
> To: [EMAIL PROTECTED]
> Subject: [Java] SQL Server 2000 Connection
>
>
>
>
> Hi Members,
> I recently installed SQL Server 2000 on my pc, but
> when I try to establish a connection to it I get the
> following error:
>
> java.sql.SQLException: [Microsoft][SQLServer 2000
> Driver for JDBC]Error establishing socket.
> at
>
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
> Source)
> at
>
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
> Source)
> at
>
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
> Source)
> at
>
com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
> Source)
> at
>
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
> Source)
> at
>
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
> Source)
> at
> com.microsoft.jdbc.base.BaseConnection.open(Unknown
> Source)
> at
> com.microsoft.jdbc.base.BaseDriver.connect(Unknown
> Source)
> at
> java.sql.DriverManager.getConnection(Unknown
>
=== message truncated ===
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~->
If you have any comments or questions, submit it on the message board.
NO spam/ads/job posting or you will be BANNED from this group. Exception can be
made it happen by notify me ahead of time.
all new members' message will be verified by me (spam..) before it get posted.
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/java_official/post?act=reply&messageNum=17910
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/java_official/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/