0

I get this error:

ERROR [HY010] [Microsoft][ODBC Driver Manager] The driver is incapable of 
supporting the current environment attributes.

when making a IDbConnection.Open()

My machine is Win 7 64, the ODBC is configured as a System DSN using TimesTen client driver.

My collegues have the same setup but never seen the error, we've been trying to solve it for two days, any help is welcome.

Zoltan Toth
  • 46,981
  • 12
  • 120
  • 134
MadCatPT
  • 1
  • 1
  • 2

1 Answers1

0

The driver is incapable of supporting the current environment attributes.

There are lots of reasons for getting the error but if I were to guess it would probably be because you are using a 64-bit opperating system - you have setup a 64-bit ODBC data source but your application is 32-bit. You need to be 100% sure that your application is the same bit size as your ODBC driver. To setup a 32-bit ODBC driver on a 64-bit machine you need to use the 32-bit ODBC Administrator usually found in

c:\Windows\SysWOW64\odbcad32.exe

If your application is 64-bit an you can not get a 64-bit ODBC driver you will need to use a product such as the Easysoft ODBC-ODBC Bridge. This allows you to connect a 64-bit application ODBC data source to an existing 32-bit data source or vice versa. There is a large desciption of 64-bit / 32-bit ODBC on the Easysoft web site.

If you have the correct bit size in both application and ODBC data source turn on Microsoft ODBC Tracing and then get in touch with the TimesTen ODBC driver support, they should be able to tell you just what is not supported in the driver.

Richard Spencer
  • 623
  • 7
  • 14
  • Tried tracing the ODBC (both the 64 and 32 bit) but only got empty files. I'm really puzzled by this. – MadCatPT Aug 02 '12 at 10:51
  • If you do not get a trace file it usually indicates the driver is failing to load. Did you have any problems setting up the ODBC data source ? – Richard Spencer Aug 02 '12 at 13:31
  • No problems, and both test buttons give success messages. – MadCatPT Aug 02 '12 at 14:12
  • I've checked everything I could remember to see if there is anything 32 Bits, but to no avail. There is only Temporary ASP.NET files in the x64 folder of the v4 framework, the TimesTen and ODAC are 64 Bits. Any tip on how to find the configuration problem? – MadCatPT Aug 02 '12 at 16:30
  • Have you tried using another application ? If you haven't got another 64-bit application Google ODBCTEST64 - you should be able to download a copy from the web. When you run it press CTRL+F and select your data source - if that connects the issue is with your application - if it fails the issue is with the ODBC driver. – Richard Spencer Aug 03 '12 at 07:12
  • SQLDriverConnect returned: SQL_ERROR=-1 dbc: szSqlState = "HY010", *pfNativeError = 0, *pcbErrorMsg = 106, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Microsoft][ODBC Driver Manager] The driver is incapable of supporting the current environment attributes." dbc: szSqlState = "HY010", *pfNativeError = 0, *pcbErrorMsg = 106, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Microsoft][ODBC Driver Manager] The driver is incapable of supporting the current environment attributes." So the problem must be with TimesTen and/or Oracle drivers? I'll try to find. – MadCatPT Aug 03 '12 at 14:14
  • The driver support team would be the people I would contact at this point. A guess would be incompatable opperating system but they would need to tell you that. – Richard Spencer Aug 06 '12 at 15:54