conversion error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JFB

    conversion error

    Private Const SQL_OV_ODBC3 As Integer = 3

    If SQL_SUCCESS = SQLSetEnvAttr(h env, SQL_ATTR_ODBC_V ERSION,
    CType(SQL_OV_OD BC3, 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




  • Chris Dunaway

    #2
    Re: conversion error

    You could try using the IntPtr constructor:

    New IntPtr(SQL_OV_O DBC3)

    instead of the CType

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: conversion error

      "Chris Dunaway" <dunawayc@gmail .com> schrieb:[color=blue]
      > You could try using the IntPtr constructor:
      >
      > New IntPtr(SQL_OV_O DBC3)
      >
      > instead of the CType[/color]

      This should work.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • JFB

        #4
        Re: conversion error

        Yes, tks for the help..
        JFB

        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
        news:eJuVmwlNGH A.1216@TK2MSFTN GP14.phx.gbl...[color=blue]
        > "Chris Dunaway" <dunawayc@gmail .com> schrieb:[color=green]
        >> You could try using the IntPtr constructor:
        >>
        >> New IntPtr(SQL_OV_O DBC3)
        >>
        >> instead of the CType[/color]
        >
        > This should work.
        >
        > --
        > M S Herfried K. Wagner
        > M V P <URL:http://dotnet.mvps.org/>
        > V B <URL:http://classicvb.org/petition/>[/color]


        Comment

        Working...