• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Connect Sybase to Java, (using Servlets)

 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried to find it online i am not getting how to connect sybase with java.

Do you have any generalized connection string for doing so?
 
Claude Moore
Ranch Hand
Posts: 828
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Googling a bit, I've found some sites that suggest to use JConnect; I really don't know if JConnect is free or must be
purchased...

Hope this may help you...
 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the way from my friend
he said first make service in sybase
and then use

DriverManager.getConnection("jdbc:sybase:Tds:host:<service name with port>",<username>,<password>);

but for that i have to create service and pass some parameters there and i am layman to sybase.

i have created a DSN including that partcular Database file which is made in sybase.
is there any other method to use it without creating service in sybase?

 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well Now i am able Connect to Sybase using service.

In Sybase, First Added Service.
in service i have to add parameters in configuration




Kindly understand above parameters of sybase and tell me in detail
what these are as i have copied it from someone's desktop without telling her.

__________________________

Now we have to add library of sybase by going into folder where uit is installed, usually it is in:

C:\Program Files\Sybase\SQL Anywhere 8\java

a Zip file naming <jdbcdrv.zip> is present there

Import it in Java libraries

than use String:


now run program we will able to connect.


___________________________________


Questions remaining:
1) meanings of those parameters explained above?
2) is there any other method to communicate with Sybase other then by creating service using system or user dsn?

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic