Hello, I have a old myDemo.db file, that was created from Sybase 5.0. I need to create a Windows app to access that DB, I have tried all possibles connections strings (using ODBC), but none worked. I have installed the Sybase 5.0 server and client app, I created the server locally(by service manager) and I can access by ISQL, but when I try to access from a .net windows app, doesn't work. Recently, I installed the Sybase latest version, but when I try to create the myDemo.db, using the Personal Server app, doesn't work. "myDemo.db was created by a different version of the software". Can someone help ? What do I need to use to create the ODBC and connect to that database? Thanks The error that I get, when trying to use ODBC: ERROR [08001] [Sybase][ODBC Driver]Unable to connect to database server Code string conStr = "Driver={Sybase SQL Anywhere 5.0};Dsn=Prima;uid=dba;PWD=test"; OdbcConnection conn = new OdbcConnection(conStr); conn.Open(); string sql = "select count(*) from ClienteCorretor"; OdbcCommand cmd = new OdbcCommand(sql, conn); int result = cmd.ExecuteNonQuery(); if (conn.State != ConnectionState.Closed) conn.Close(); asked 13 Dec '12, 06:36 Bruno Dumont Mark Culp |
This configuration will not work. The SQL Anywhere 5.5 ODBC driver ( Are you in a position to migrate your SQL Anywhere 5.5 to a higher SQL Anywhere database version? (This would also allow you to use our ADO.NET driver directly in .NET instead of trying to use You really shouldn't be developing new applications on an unsupported database version as we will have limited options to help you if you run into other problems with this development process or while operating in prodcution. answered 13 Dec '12, 11:42 Jeff Albion 2
Just in case migrating the v5 database itself is not feasible: AFAIK, a v9 database server (which has a ADO.Net driver) would allow you to run that v5 database...
(13 Dec '12, 12:23)
Volker Barth
Replies hidden
Volker, where can I find that version?
(13 Dec '12, 12:55)
Bruno Dumont
Thanks Jeff. I know that its an old version, but I have a windows app from another company that uses that version, and I'm developing a .net app to assist my client in their daily needs, that must access the same DB. Unfortunately i cant change it.
(13 Dec '12, 13:03)
Bruno Dumont
Replies hidden
1
The full version is no longer available for purchase (for production deployment), nor is the developer version (for testing). SQL Anywhere 9.0.x has been end-of-life'd. Also see this question here.
(13 Dec '12, 15:38)
Jeff Albion
2
In that case, you may have to change how you're planning to write your new program. If you need to stay with the SA 5.x engine / database, you'll be limited developing with an ODBC 2.0 interface with the SA 5.x ODBC driver - If you really wanted to stay in .NET, this would mean you would have to write some kind of COM/Interop native C/C++ "wrapper" that makes only native ODBC 2.0 calls out to the SA 5.x ODBC driver (via pinvoke) and returns the data to the managed environment. (i.e. You need to prevent all
(13 Dec '12, 15:48)
Jeff Albion
So, I can't use the v9 to run the db from v5 =/. ty
(13 Dec '12, 15:53)
Bruno Dumont
|