1. Jordi Ferrer
  2. PowerBuilder
  3. Tuesday, 12 November 2024 09:54 AM UTC

I know it has nothing to do with the current Powerbuilder, but since we come from where we come from we have a problem that we don't know how to solve.

We need to connect from Java through a jar connector to a database in Sybase12.

We are trying all the jars we have found: jodbc4.jar, sajdbc4.jar

But we are missing the correct connection string. We are trying jdbc:sybase:Tds:192.168.4.1:5000/dbName

Could you help us or direct us to someone who can help us with this?

Thank you in advance.

Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 15 November 2024 08:12 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

While you already found how to connect, I will mention the following, for other people who may searching about this topic.

Another way to connect is using DSN.

jdbc:sqlanywhere:DSN=<Your DSN Name>;UserID=<userid>;Password=<password>;"

I did used that way in many cases in the past without any issues.

Driver class I was using: sap.jdbc4.sqlanywhere.IDriver

Jar files, those you mentioned: jodbc4.jar and sajdbc4.jar...

I will also mention, that I think in some versions of sql anywhere jdbc url is jdbc:ianywhere (sql anywhere 12 and older versions), and in later versions jdbc:sqlanywhere. In my case, I was connecting to sql anywhere 17, so driver class and url contained sqlanywhere instead of ianywhere.

Andreas.

Comment
There are no comments made yet.
Jordi Ferrer Accepted Answer Pending Moderation
  1. Wednesday, 13 November 2024 16:46 PM UTC
  2. PowerBuilder
  3. # 2

Thanks to all,

Browsing the internet and thanks to your comments we have been able to connect through jodbc4.jar using the connection string:
jdbc:ianywhere:Driver=SQL Anywhere 12;Host=HOST:2638;ENG=ENGINE_NAME;DBF=DATABASE;DBN=DATABASENAME;UID=DATABASEUSER;PWD=DATABASEPWD

We are doing several tests to verify stability, but it seems to be correct.

Thanks to all.

Comment
There are no comments made yet.
Arnd Schmidt Accepted Answer Pending Moderation
  1. Tuesday, 12 November 2024 22:19 PM UTC
  2. PowerBuilder
  3. # 3

Hi,

normally you get an error including an error message.
If you want to connect via sajdbc4.jar to an SQL Anywhere Database you need to use jdbc:sqlanywhere.

Connecting to SQL Anywhere using JDBC:
https://community.sap.com/t5/technology-blogs-by-sap/connecting-to-sql-anywhere-using-jdbc/ba-p/13083493

what is your error message?!

Comment
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Tuesday, 12 November 2024 10:51 AM UTC
  2. PowerBuilder
  3. # 4

Hi

I think you need to be contacting Sybase support for this specific question. I did a quick search and found this which might help:

https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sqlanywhere.12.0.1/dbprogramming/connecting-establishing-jdbc.html

Good luck

David

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 12 November 2024 15:41 PM UTC
Hi David;

He will need a lot of luck as Sybase no longer exists.

@Jordi - You can try SAP for this support as they bought out Sybase out in the 2014 time frame.

Regards .. Chris
  1. Helpful
  1. David Peace (Powersoft)
  2. Tuesday, 12 November 2024 15:43 PM UTC
Ha Ha, yes Chris.

I meant SAP, but you need a lot of luck with them too....
  1. Helpful 2
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.