Groups | Blog | Home
all groups > dotnet odbc.net > november 2003 >

dotnet odbc.net : NotesSQL Connection Problems


Thomas Dodds
11/12/2003 4:36:39 PM
My VB.Net code ...

Dim strConnString As String = "Driver={Lotus NotesSQL Driver (*.nsf)};
Server=IRIS;Database=mail\tdodds.nsf;Uid=tdodds;Pwd=NTTCcon1"
Dim connNotes As New OdbcConnection(strConnString)

When I run the connNotes.Open() I get the following error:

ERROR [IM005] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on
SQL_HANDLE_DBC failed ERROR [01000] [Microsoft][ODBC Driver Manager] The
driver doesn't support the version of ODBC behavior that the application
requested (see SQLSetEnvAttr).
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [IM005]
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't
support the version of ODBC behavior that the application requested (see
SQLSetEnvAttr).

Source Error:

Line 26:
Line 27: If connNotes.State = ConnectionState.Closed Then
Line 28: connNotes.Open()
Line 29: End If
Line 30:



Any help appreciated ...

Thanks,

Thomas

HussAb NO[at]SPAM online.microsoft.com
11/13/2003 3:13:33 AM
Thomas,

Looks like you are trying to use an OLD ODBC driver. The following article lists the requirements for ODBC drivers to work with ODBC .NET:

INFO: ODBC Driver Support Requirements for Use with ODBC .NET Managed Provider
http://support.microsoft.com/?id=321895

Check with the ODBC driver vendor and make sure that you get a .NET certified ODBC driver.

I hope this helps!


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

Thomas Dodds
11/13/2003 8:08:05 AM
Hussein,

Thank you for your reply. I have the latest NotesSQL ODBC driver, but I do
not know if it is .NET certified. I will look into this.

Thanks again,

Thomas

[quoted text, click to view]

Thomas Dodds
11/13/2003 10:52:36 AM
Hussein,

I cannot find any information on whether or not the driver is certified ...
I know it doesn't work with System.Data.Oledb, but I thought it should work
with Microsoft.Data.Odbc ... I have read posts about people trying to
perform updates (so I assume that connectivity through .NET is possible)
with a previous version and the same version of the driver than I am using.

I am thinking that it is a permissions/authentication issue and am not sure
how to successfully pass the uid/pwd through ... I have it in my connection
string, but am still prompted. I looked in my documentation and was given
instructions on how to suppress the dialogue but to no avail.

Thomas

[quoted text, click to view]

HussAb NO[at]SPAM online.microsoft.com
11/14/2003 1:52:22 AM
Thanks for the added info. The vendor should be able to answer if the driver is certified or not. However in regard to using any ODBC driver with System.Data.OleDb is not
possible and this applies to all ODBC drivers even the drivers that Microsoft release. This used to work in early stages of the VS.NET (may be with Beta1) however since the
RTM release and the OleDb name space is restricted to work only with OleDb providers and the Odbc name space is restricted to work only with ODBC drivers.

As far as the second part of your post, usually permission errors are explicit and should say something to this extent. However, your error message clearly indicates that the
ODBC behavior is not correct. I don't know how much you know about ODBC, but ODBC drivers are not the same. The article that I referenced earlier mentions that the driver
has to support SQL_DRIVER_ODBC_VER : ODBC 2.0.

I hope this helps!


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

intechpc
8/26/2004 10:18:50 AM

I was receiving this same error and was able to fix it very easily. Al
I had to do was cut down my connection string to only include th
"DSN=" portion and I was then able to make the ODBC connection. Remov
the driver specification, Server, UID and PWD from your connectio
string and try it again. Of course this means you have to have al
that specified in your DSN, but I believe NotesSQL requires tha
anyway


-
intechp
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message57044.htm
AddThis Social Bookmark Button