3

I'm trying to connect with .net to a remote sybase sql anywhere database.

I don't see much info online how to connect, mostly ODBC or DSN files.

I tried this connection string:

Data Source=myserver.com;Port=2638;Uid=myuser;Pwd=mypass

Which gives the following error

Invalid connection string. Invalid or missing keyword near 'Port' Parameter name: connectionString

So I tried to include the port with the server, like this:

Data Source=myserver.com:2638;Uid=myuser;Pwd=mypass

Which gives a new error:

DSN 'myserver:2638' does not exist

So, what is the correct connection string?

PS. Using sybase central, I was able to connect to the database, so it's not a network / firewall / port issue.

Thanks!

Graeme Perrow
  • 56,086
  • 21
  • 82
  • 121
Yisroel M. Olewski
  • 1,560
  • 3
  • 25
  • 41

1 Answers1

2

You want to use HOST=myserver.com:2638;uid=myuser;pwd=mypass. The list of valid connection parameters is documented here.

Graeme Perrow
  • 56,086
  • 21
  • 82
  • 121