on 07-21-2014 10:53 AM
I am trying to connect to SQL anywhere 5.0 using below connection string
sConnString =
" Driver=Sybase SQL Anywhere 5.0;Uid=dba;Pwd=sql;EngineName=Tenmax;DatabaseName=Tenmax;Start=c:\sqlany50\win32\dbclient.exe;DatabaseSwitches=-commandSwitch1 -commandSwitch2;DatabaseFile=E:\Applications\VinayNandaLIL\Tenmax.db;AutoStop=NO;"
It is giving below error
ERROR [08001] [Sybase][ODBC Driver]Unable to connect to database server: unable to start database engine
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
Please guide.
The problem you are most likely having is that the application is trying to use the ODBC SDK version 3.5, but the SQL Anywhere version 5 ODBC driver only supported ODBC SDK version 2.x (or maybe 3.0).
There is no way around this unless you have a more recent version of SQL Anywhere that you can use to access (and rebuild) the database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Whether the ASP.Net version can use an older ODBC SDK is up to the ASP.Net application. I don't know anything about that.
If you have access to any version of the software between version 6 and version 9, you could try an ODBC driver from one of those more recent versions.
As an aside, if your end goal is just to get data out of the database, you might have more luck using one of the utilities like dbunload (to unload data in csv format) or dbisql to select the data from the tables and save it out to files.
--Jason
Hi Rashim,
Is there any possibility that we can use ODBC SDK version 2.x while connecting to SQL Anywhere version 5.
No, not from .NET - there is no workaround for this problem. You cannot directly use any of the existing ADO.NET ODBC providers as they all use ODBC 3.0.
Secondly if not how we can connect to SQL Anywhere version 5 database with Newer version with ASP.NET
You won't be able to use ADO.NET with any of the SQL Anywhere ODBC drivers that do not support ODBC 3.0. You'll need to upgrade at least the ODBC driver to SQL Anywhere 6.0 as this was when ODBC 3.0 was first supported.
Just a note that this is the same question that appears here: How to connect to a Sybase v5.0 server using ODBC + .net - SQLA Forum
Regards,
Jeff Albion
SAP Active Global Support
Hello Rashim,
I am not able to migrate .db file as it is generated from external vendor. Please suggest a proper way ou to extract data from that file.
If this database is included in another vendor's product then you should ask the external vendor how to unload data from their product. As I mentioned, you will not be able to connect to this database using an ADO.NET provider that utilizes ODBC 3.0.
If you are given read-only access to the vendor's database and just wish to extract the data in a one-time operation, then you can try using the version 5.0 Unload Utility (dbunload) to unload the data tables to text files on the file system:
e.g.
dbunload -c "Uid=dba;Pwd=sql;EngineName=Tenmax;DatabaseName=Tenmax;DatabaseFile=E:\Applications\VinayNandaLIL\Tenmax.db;Start=c:\sqlany50\win32\dbeng50.exe" c:\unload
If you wish to access the data directly though ADO.NET though, you'll have to upgrade to a newer version of SQL Anywhere.
Regards,
Jeff Albion
SAP Active Global Support
Your command line is trying to connect to the SQL Anywhere version 5.0 client, and not a server directly. Depending on what you are really trying to accomplish, you need to either:
- start the database server on a separate machine, and then use the client to connect to it
or
- change your command line to connect to the database engine (dbeng50.exe)
You should know that version 5.0 is VERY old (for software). It was released in 1996. I would strongly recommend that you consider one of the newer versions. You can download the version 16 Developer Edition here if you would like to try it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii Chris
Thanks for the response. Actually i have .db file generated from a machine testing. Therefore i want to extract data from that and generated file is a SQL anywhere 5.0 database file. So integrate that is need to create a connection between file and asp.net.
I installed a SQL anywhere client to view the file contents , integrating for testing . But i am unable to create connection. Please provide any example or connection string for that
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.