Home All Groups Group Topic Archive Search About
Author
20 Feb 2006 5:09 PM
JFB
Private Const SQL_OV_ODBC3 As Integer = 3

If SQL_SUCCESS = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION,
CType(SQL_OV_ODBC3, IntPtr), 0) Then

Hi  Geeks,
I have and error saying that SQL_OV_ODBC3 cannot convert to IntPtr...
How can I fix this??
Tks
JFB

Author
20 Feb 2006 6:45 PM
Chris Dunaway
You could try using the IntPtr constructor:

New IntPtr(SQL_OV_ODBC3)

instead of the CType
Author
20 Feb 2006 8:28 PM
Herfried K. Wagner [MVP]
"Chris Dunaway" <dunaw***@gmail.com> schrieb:
> You could try using the IntPtr constructor:
>
> New IntPtr(SQL_OV_ODBC3)
>
> instead of the CType

This should work.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
20 Feb 2006 8:47 PM
JFB
Yes, tks for the help..
JFB

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:eJuVmwlNGHA.1216@TK2MSFTNGP14.phx.gbl...
> "Chris Dunaway" <dunaw***@gmail.com> schrieb:
>> You could try using the IntPtr constructor:
>>
>> New IntPtr(SQL_OV_ODBC3)
>>
>> instead of the CType
>
> This should work.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>