rodhoward / node-sybase

23 stars 55 forks source link

dbname is despised #38

Closed drauber closed 3 years ago

drauber commented 3 years ago

Using a Sybase Sql Anywhere 9, where there is more than one database running, the same database is always connected, regardless of the dbname informed for connection. Looking at the repository I saw that SybaseDB makes the connection "jdbc:sybase:Tds:" + host + ":" + port + "/" + dbname. However, to connect to a specific db, I always use "jdbc:sybase:Tds:" + host + : + port + "? ServiceName=" + DBNAME. With this jdbc url the connection is made successfully in the indicated dbname. I would suggest that there was the possibility of connecting to a specific DB. Thanks.

rodhoward commented 3 years ago

Thanks for that yeah I see both formats..

https://razorsql.com/docs/help_sybase.html seems to be advocating: JDBC URL FORMAT: jdbc:jtds:sybase://<host>[:<port>][/<database_name>]

While SyBooks seems to be recommending:

jdbc:sybase:Tds:host:port?ServiceName=database

Not sure if its a sybase version issue.. driver version or simply one is wrong and one isn't but I don't have access to sybase any more so I'm not comfortable making that change.

Please fork if you like its a very simple change.

Cheers Rod

drauber commented 3 years ago

Thanks for that yeah I see both formats..

https://razorsql.com/docs/help_sybase.html seems to be advocating: JDBC URL FORMAT: jdbc:jtds:sybase://<host>[:<port>][/<database_name>]

While SyBooks seems to be recommending:

jdbc:sybase:Tds:host:port?ServiceName=database

Not sure if its a sybase version issue.. driver version or simply one is wrong and one isn't but I don't have access to sybase any more so I'm not comfortable making that change.

Please fork if you like its a very simple change.

Cheers Rod

Thank you so much Rod, I just wanted to keep just in only one project. I will fork :D