I'm trying to connect to a SQL Anywhere 5 database (I know it's olllld!) with a .NET 3.5 app in WinXP and it works fine from a stand alone console app. But when I run the exact code in a plugin ,running off a separate AppDomain, (the only difference I can tell between the two) with the following code, I get the errors further below.

BTW Both are executed as the SAME user.

       using (OdbcConnection connection =
            new OdbcConnection(strConnect))
        {
            OdbcCommand command = new OdbcCommand(query, connection);
            command.CommandType = CommandType.Text;
            DataTable posRecordsTable = new DataTable();
            connection.Open();

OdbcException Exception returns the following error:

[Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

Any idea what's going on??

How could I determine the difference in environment settings between the C# app where there is no problem and the C# app where there is a problem using a separate AppDomain but trying to connect to the database with the same code?

asked 13 Jun '12, 00:07

Heckflosse230's gravatar image

Heckflosse230
16112
accept rate: 0%

You can try to log (trace) odbc, in the logfile you might find more information. It might be, that the error message above is just a follow up error of the real problem...

(13 Jun '12, 03:36) Martin
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×145

question asked: 13 Jun '12, 00:07

question was seen: 2,133 times

last updated: 13 Jun '12, 03:36