5 Replies Latest reply on Aug 30, 2012 12:01 PM by AlastairMcInnes

    ODBC throwing exception in VB.Net

    AlastairMcInnes

      Title

      ODBC throwing exception in VB.Net

      Post

      Hello,

      I'm using VB.net (visual studio express 2008, but also tried in 2003) to access Filemaker data in a Windows Form Application (Windows 7). I have created a simple app to demonstrate the problem. There is a single button and and a single listbox and the entirety of the program code is:

      Public Class Form1

          Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

              Dim conn As ADODB.Connection
              Dim rs As ADODB.Recordset

              conn = New ADODB.Connection
              conn.Open("DSN=TitlesUS_Triple8", "Username", "password")

              rs = New ADODB.Recordset
              rs.Open("SELECT Binding, SKU13, Contract_ID FROM ""US Titles"" WHERE Contract_ID > 1", conn)

              If Not rs.EOF Then
                 rs.MoveFirst()

                  Do While Not rs.EOF
                      ListBox1.Items.Add(rs.Fields("Contract_ID").Value)

                      rs.MoveNext()
                  Loop
              End If
          End Sub
      End Class
       
      The program throws an exception at the rs.MoveFirst() line. The exception error message is:
      "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
      If I take out the MoveFirst statement, the program works as intended and the listbox is populated with the contract IDs.
      Obviously, I could just take out the MoveFirst statement, but it seems to me that there is something going wrong somewhere
      and it's not wise to rely on it not poking its head up somewhere else.
      When I ran the same program in VB.Net 2003, the error was that rs was not set to an instance of an object (despite 
      the fact that the watch window was showing the values of some of the rs properties up to that point).
      I'm using ADO 6.1 if that helps, but I've tried a couple of other version. The FM database is remotely hosted. If I use a 
      local copy, I don't get the problem. 
      I can't find anything on google which sounds similar so I'm hoping someone here has the answer.
      Many thanks,
      Alastair

        • 1. Re: ODBC throwing exception in VB.Net
          actualjon

          It doesn't look like you're doing any error handling when connecting to the database or executing the query.  Is it possible your connection or query failed, and you're trying to do a rs.MoveFirst on an undefined rescordset?

          If you just left out the error handling for the sake of simplicity and it is connecting and querying successfully, could you use the ODBC Administrator to capture a trace log while executing the example program, and post the result here (if it is less than 100 lines or so)?

          Jonathan

          • 2. Re: ODBC throwing exception in VB.Net
            AlastairMcInnes

            Thanks for the response, Jonathan.

            In fact, that little program didn't have any exception handling in it - I only threw it together to see if I it was likely that anything else in my actual program (the one I'm supposed to be developing) could be creating the error.

            However, I added a Try/Catch round both the connection and recordset open statements and neither caught anything. Using the debugger, I can see that the rs.eof flag is False immediately after the recordset.open statement. Which makes it odd that, in the VB2003 version, two lines further down, it insists that the object isn't set to anything.

            Anyway, I created a logfile as you suggested - there is actually an error flag being returned by an "EXIT  SQLExtendedFetch" line but I have no idea what that actually does. I assume it (and it's "ENTER SQL ExtendedFetch" partner) were created by the MoveFirst line, but I'm not sure.

            I'll upload the log file - perhaps there's something else in it that means something to someone who knows what they're doing. I'm well out of my depth in it.

            • 3. Re: ODBC throwing exception in VB.Net
              AlastairMcInnes

              I guess the log file didn't get attached. Here it is then:

               


              TestODBC.vshost 3108-3198     ENTER SQLAllocEnv
                        HENV *              0x15B0B1AC

              TestODBC.vshost 3108-3198     EXIT  SQLAllocEnv  with return code 0 (SQL_SUCCESS)
                        HENV *              0x15B0B1AC ( 0x004EDB30)

              TestODBC.vshost 3108-3198     ENTER SQLGetEnvAttr
                        SQLHENV             0x004EDB30
                        SQLINTEGER                 201 <SQL_ATTR_CONNECTION_POOLING>
                        SQLPOINTER          0x06A3CC94
                        SQLINTEGER                   4
                        SQLINTEGER *        0x06A3CC90

              TestODBC.vshost 3108-3198     EXIT  SQLGetEnvAttr  with return code 0 (SQL_SUCCESS)
                        SQLHENV             0x004EDB30
                        SQLINTEGER                 201 <SQL_ATTR_CONNECTION_POOLING>
                        SQLPOINTER          0x06A3CC94 (0) <SQL_CP_OFF>
                        SQLINTEGER                   4
                        SQLINTEGER *        0x06A3CC90 (0)

              TestODBC.vshost 3108-3198     ENTER SQLAllocEnv
                        HENV *              0x15B0B1B0

              TestODBC.vshost 3108-3198     EXIT  SQLAllocEnv  with return code 0 (SQL_SUCCESS)
                        HENV *              0x15B0B1B0 ( 0x004EDBA8)

              TestODBC.vshost 3108-3198     ENTER SQLSetEnvAttr
                        SQLHENV             0x004EDBA8
                        SQLINTEGER                 201 <SQL_ATTR_CONNECTION_POOLING>
                        SQLPOINTER                 0 <SQL_CP_OFF>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetEnvAttr  with return code 0 (SQL_SUCCESS)
                        SQLHENV             0x004EDBA8
                        SQLINTEGER                 201 <SQL_ATTR_CONNECTION_POOLING>
                        SQLPOINTER                 0 <SQL_CP_OFF>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLAllocConnect
                        HENV                0x004EDBA8
                        HDBC *              0x06A3D91C

              TestODBC.vshost 3108-3198     EXIT  SQLAllocConnect  with return code 0 (SQL_SUCCESS)
                        HENV                0x004EDBA8
                        HDBC *              0x06A3D91C ( 0x004EDE40)

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       10 <SQL_ODBC_VER>
                        PTR                 0x06A3D8EC
                        SWORD                       22
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       10 <SQL_ODBC_VER>
                        PTR                 0x06A3D8EC [      -3] "03.80.0000\ 0"
                        SWORD                       22
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLSetConnectAttrW
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                 103 <SQL_ATTR_LOGIN_TIMEOUT>
                        SQLPOINTER                15
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetConnectAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                 103 <SQL_ATTR_LOGIN_TIMEOUT>
                        SQLPOINTER                15
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLDriverConnectW
                        HDBC                0x004EDE40
                        HWND                0x00000000
                        WCHAR *             0x058F8B34 [      -3] "******\ 0"
                        SWORD                       -3
                        WCHAR *             0x058F8B34
                        SWORD                       -3
                        SWORD *             0x00000000
                        UWORD                        0 <SQL_DRIVER_NOPROMPT>

              TestODBC.vshost 3108-3198     EXIT  SQLDriverConnectW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        HWND                0x00000000
                        WCHAR *             0x058F8B34 [      -3] "******\ 0"
                        SWORD                       -3
                        WCHAR *             0x058F8B34 <Invalid buffer length!> [-3]
                        SWORD                       -3
                        SWORD *             0x00000000
                        UWORD                        0 <SQL_DRIVER_NOPROMPT>

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       77 <SQL_DRIVER_ODBC_VER>
                        PTR                 0x06A3D8E8
                        SWORD                       24
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       77 <SQL_DRIVER_ODBC_VER>
                        PTR                 0x06A3D8E8 [      -3] "03.00\ 0"
                        SWORD                       24
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       79 <SQL_POS_OPERATIONS>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       79 <SQL_POS_OPERATIONS>
                        PTR                 0x06A3D6A4 ( 0x0000001F)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       83 <SQL_STATIC_SENSITIVITY>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       83 <SQL_STATIC_SENSITIVITY>
                        PTR                 0x06A3D6A4 ( 0x00000000)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       78 <SQL_LOCK_TYPES>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       78 <SQL_LOCK_TYPES>
                        PTR                 0x06A3D6A4 ( 0x00000001)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       81 <SQL_GETDATA_EXTENSIONS>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       81 <SQL_GETDATA_EXTENSIONS>
                        PTR                 0x06A3D6A4 ( 0x0000000B)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       72 <SQL_TXN_ISOLATION_OPTION>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       72 <SQL_TXN_ISOLATION_OPTION>
                        PTR                 0x06A3D6A4 ( 0x00000002)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       82 <SQL_BOOKMARK_PERSISTENCE>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       82 <SQL_BOOKMARK_PERSISTENCE>
                        PTR                 0x06A3D6A4 ( 0x00000010)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       44 <SQL_SCROLL_OPTIONS>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       44 <SQL_SCROLL_OPTIONS>
                        PTR                 0x06A3D6A4 ( 0x00000011)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       43 <SQL_SCROLL_CONCURRENCY>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       43 <SQL_SCROLL_CONCURRENCY>
                        PTR                 0x06A3D6A4 ( 0x00000009)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                      144 <SQL_DYNAMIC_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      144 <SQL_DYNAMIC_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4 ( 0x00000000)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                      150 <SQL_KEYSET_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      150 <SQL_KEYSET_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4 ( 0x00000000)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                      167 <SQL_STATIC_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      167 <SQL_STATIC_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4 ( 0x0001FE4F)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                      146 <SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      146 <SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1>
                        PTR                 0x06A3D6A4 ( 0x0001E001)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                      151 <SQL_KEYSET_CURSOR_ATTRIBUTES2>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      151 <SQL_KEYSET_CURSOR_ATTRIBUTES2>
                        PTR                 0x06A3D6A4 ( 0x00000000)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                      168 <SQL_STATIC_CURSOR_ATTRIBUTES2>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      168 <SQL_STATIC_CURSOR_ATTRIBUTES2>
                        PTR                 0x06A3D6A4 ( 0x00005F89)
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                      111 <SQL_NEED_LONG_DATA_LEN>
                        PTR                 0x06A3D6A8
                        SWORD                      512
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      111 <SQL_NEED_LONG_DATA_LEN>
                        PTR                 0x06A3D6A8 [      -3] "Y\ 0"
                        SWORD                      512
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       16 <SQL_DATABASE_NAME>
                        PTR                 0x00000000
                        SWORD                        0
                        SWORD *             0x06A3D6A0

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       16 <SQL_DATABASE_NAME>
                        PTR                 0x00000000 <null pointer>
                        SWORD                        0
                        SWORD *             0x06A3D6A0 (50)

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       23 <SQL_CURSOR_COMMIT_BEHAVIOR>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       23 <SQL_CURSOR_COMMIT_BEHAVIOR>
                        PTR                 0x06A3D6A4 (2) <SQL_CB_PRESERVE>
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       24 <SQL_CURSOR_ROLLBACK_BEHAVIOR>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       24 <SQL_CURSOR_ROLLBACK_BEHAVIOR>
                        PTR                 0x06A3D6A4 (2) <SQL_CB_PRESERVE>
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       46 <SQL_TXN_CAPABLE>
                        PTR                 0x06A3D6A4
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       46 <SQL_TXN_CAPABLE>
                        PTR                 0x06A3D6A4 (1) <SQL_TC_DML>
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLSetConnectAttrW
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                   1 <SQL_ATTR_MAX_ROWS>
                        SQLPOINTER                 0
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetConnectAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                   1 <SQL_ATTR_MAX_ROWS>
                        SQLPOINTER                 0
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLSetConnectAttrW
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                   0 <SQL_ATTR_QUERY_TIMEOUT>
                        SQLPOINTER                 0
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetConnectAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                   0 <SQL_ATTR_QUERY_TIMEOUT>
                        SQLPOINTER                 0
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       17 <SQL_DBMS_NAME>
                        PTR                 0x06A3D634
                        SWORD                       84
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       17 <SQL_DBMS_NAME>
                        PTR                 0x06A3D634 [      -3] "FileMaker\ 0"
                        SWORD                       84
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                        6 <SQL_DRIVER_NAME>
                        PTR                 0x06A3D654
                        SWORD                       52
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                        6 <SQL_DRIVER_NAME>
                        PTR                 0x06A3D654 [      -3] "fmodbc32.dll\ 0"
                        SWORD                       52
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                        6 <SQL_DRIVER_NAME>
                        PTR                 0x06A3D654
                        SWORD                       52
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                        6 <SQL_DRIVER_NAME>
                        PTR                 0x06A3D654 [      -3] "fmodbc32.dll\ 0"
                        SWORD                       52
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                        6 <SQL_DRIVER_NAME>
                        PTR                 0x06A3D658
                        SWORD                       48
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                        6 <SQL_DRIVER_NAME>
                        PTR                 0x06A3D658 [      -3] "fmodbc32.dll\ 0"
                        SWORD                       48
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetFunctions
                        HDBC                0x004EDE40
                        UWORD                      999
                        UWORD *             0x071C8938

              TestODBC.vshost 3108-3198     EXIT  SQLGetFunctions  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                      999
                        UWORD *             0x071C8938 (65534)

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                        1 <SQL_ACTIVE_STATEMENTS>
                        PTR                 0x06A3D8D0
                        SWORD                        2
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                        1 <SQL_ACTIVE_STATEMENTS>
                        PTR                 0x06A3D8D0 (1)
                        SWORD                        2
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetConnectAttrW
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                 109 <SQL_ATTR_CURRENT_CATALOG>
                        SQLPOINTER          0x06A3D6E8
                        SQLINTEGER                 514
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetConnectAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                 109 <SQL_ATTR_CURRENT_CATALOG>
                        SQLPOINTER          0x06A3D6E8 [      -3] "\ 0"
                        SQLINTEGER                 514
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       26 <SQL_DEFAULT_TXN_ISOLATION>
                        PTR                 0x06A3D8C0
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       26 <SQL_DEFAULT_TXN_ISOLATION>
                        PTR                 0x06A3D8C0 (2) <SQL_TXN_READ_COMMITTED>
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLAllocStmt
                        HDBC                0x004EDE40
                        HSTMT *             0x06A3DC60

              TestODBC.vshost 3108-3198     EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        HSTMT *             0x06A3DC60 ( 0x004EE190)

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  18 <SQL_ATTR_PARAM_BIND_TYPE>
                        SQLPOINTER                10 <unknown>
                        SQLINTEGER                   0

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code -1 (SQL_ERROR)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  18 <SQL_ATTR_PARAM_BIND_TYPE>
                        SQLPOINTER                10 <unknown>
                        SQLINTEGER                   0

                        DIAG [S1092] [FileMaker][FileMaker] Invalid attribute/option identifier (0)

              TestODBC.vshost 3108-3198     ENTER SQLGetInfoW
                        HDBC                0x004EDE40
                        UWORD                       36 <SQL_MULT_RESULT_SETS>
                        PTR                 0x06A3D95C
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
                        HDBC                0x004EDE40
                        UWORD                       36 <SQL_MULT_RESULT_SETS>
                        PTR                 0x06A3D95C [      -3] "N\ 0"
                        SWORD                        4
                        SWORD *             0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   6 <SQL_ATTR_CURSOR_TYPE>
                        SQLPOINTER          0x06A3D998
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   6 <SQL_ATTR_CURSOR_TYPE>
                        SQLPOINTER          0x06A3D998 (0) <SQL_CURSOR_FORWARD_ONLY>
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   7 <SQL_ATTR_CONCURRENCY>
                        SQLPOINTER          0x06A3D994
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   7 <SQL_ATTR_CONCURRENCY>
                        SQLPOINTER          0x06A3D994 (1) <SQL_CONCUR_READ_ONLY>
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetConnectAttrW
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                 108 <SQL_ATTR_TXN_ISOLATION>
                        SQLPOINTER          0x06A3D98C
                        SQLINTEGER                   4
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetConnectAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHDBC             0x004EDE40
                        SQLINTEGER                 108 <SQL_ATTR_TXN_ISOLATION>
                        SQLPOINTER          0x06A3D98C (2) <SQL_TXN_READ_COMMITTED>
                        SQLINTEGER                   4
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   0 <SQL_ATTR_QUERY_TIMEOUT>
                        SQLPOINTER                30
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   0 <SQL_ATTR_QUERY_TIMEOUT>
                        SQLPOINTER                30
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLParamOptions
                        HSTMT               0x004EE190
                        SQLULEN                    1
                        SQLULEN *           0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLParamOptions  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        SQLULEN                    1
                        SQLULEN *           0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLExecDirectW
                        HSTMT               0x004EE190
                        WCHAR *             0x071CA868 [      82] "SELECT Binding, SKU13, Contract_ID FROM "US Titles" WHERE Contract_ID > 1"
                        SDWORD                    82

              TestODBC.vshost 3108-3198     EXIT  SQLExecDirectW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        WCHAR *             0x071CA868 [      82] "SELECT Binding, SKU13, Contract_ID FROM "US Titles" WHERE Contract_ID > 1"
                        SDWORD                    82

              TestODBC.vshost 3108-3198     ENTER SQLGetDiagFieldW
                        SQLSMALLINT                  3
                        SQLHANDLE           0x004EE190
                        SQLSMALLINT                  0
                        SQLSMALLINT              -1249
                        SQLPOINTER         0x06A3D980
                        SQLSMALLINT                  4
                        SQLSMALLINT *       0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetDiagFieldW  with return code 0 (SQL_SUCCESS)
                        SQLSMALLINT                  3
                        SQLHANDLE           0x004EE190
                        SQLSMALLINT                  0
                        SQLSMALLINT              -1249
                        SQLPOINTER         0x06A3D980
                        SQLSMALLINT                  4
                        SQLSMALLINT *       0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLRowCount
                        HSTMT               0x004EE190
                        SQLLEN *            0x06A3D984

              TestODBC.vshost 3108-3198     EXIT  SQLRowCount  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        SQLLEN *            0x06A3D984 (-1)

              TestODBC.vshost 3108-3198     ENTER SQLNumResultCols
                        HSTMT               0x004EE190
                        SWORD *             0x06A3D9A0

              TestODBC.vshost 3108-3198     EXIT  SQLNumResultCols  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        SWORD *             0x06A3D9A0 (3)

              TestODBC.vshost 3108-3198     ENTER SQLNumResultCols
                        HSTMT               0x004EE190
                        SWORD *             0x06A3D510

              TestODBC.vshost 3108-3198     EXIT  SQLNumResultCols  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        SWORD *             0x06A3D510 (3)

              TestODBC.vshost 3108-3198     ENTER SQLDescribeColW
                        HSTMT               0x004EE190
                        UWORD                        1
                        WCHAR *             0x00000000
                        SWORD                        0
                        SWORD *             0x00000000
                        SWORD *             0x06A3D518
                        SQLULEN *           0x06A3D528
                        SWORD *             0x06A3D52C
                        SWORD *             0x06A3D500

              TestODBC.vshost 3108-3198     EXIT  SQLDescribeColW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        1
                        WCHAR *             0x00000000 <null pointer>
                        SWORD                        0
                        SWORD *             0x00000000
                        SWORD *             0x06A3D518 (-1)
                        SQLULEN *           0x06A3D528 (25)
                        SWORD *             0x06A3D52C (0)
                        SWORD *             0x06A3D500 (1)

              TestODBC.vshost 3108-3198     ENTER SQLColAttributesW
                        HSTMT               0x004EE190
                        UWORD                        1
                        UWORD                       18 <SQL_DESC_LABEL>
                        PTR                0x06A3D530
                        SWORD                     1024
                        SWORD *             0x06A3D504
                        SQLLEN *            0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLColAttributesW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        1
                        UWORD                       18 <SQL_DESC_LABEL>
                        PTR                0x06A3D530
                        SWORD                     1024
                        SWORD *             0x06A3D504 (14)
                        SQLLEN *            0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLColAttributesW
                        HSTMT               0x004EE190
                        UWORD                        1
                        UWORD                       10 <SQL_DESC_UPDATABLE>
                        PTR                0x00000000
                        SWORD                        0
                        SWORD *             0x06A3D508
                        SQLLEN *            0x06A3D524

              TestODBC.vshost 3108-3198     EXIT  SQLColAttributesW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        1
                        UWORD                       10 <SQL_DESC_UPDATABLE>
                        PTR                0x00000000
                        SWORD                        0
                        SWORD *             0x06A3D508 (0)
                        SQLLEN *            0x06A3D524 (0)

              TestODBC.vshost 3108-3198     ENTER SQLDescribeColW
                        HSTMT               0x004EE190
                        UWORD                        2
                        WCHAR *             0x00000000
                        SWORD                        0
                        SWORD *             0x00000000
                        SWORD *             0x06A3D518
                        SQLULEN *           0x06A3D528
                        SWORD *             0x06A3D52C
                        SWORD *             0x06A3D500

              TestODBC.vshost 3108-3198     EXIT  SQLDescribeColW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        2
                        WCHAR *             0x00000000 <null pointer>
                        SWORD                        0
                        SWORD *             0x00000000
                        SWORD *             0x06A3D518 (8)
                        SQLULEN *           0x06A3D528 (15)
                        SWORD *             0x06A3D52C (0)
                        SWORD *             0x06A3D500 (1)

              TestODBC.vshost 3108-3198     ENTER SQLColAttributesW
                        HSTMT               0x004EE190
                        UWORD                        2
                        UWORD                       18 <SQL_DESC_LABEL>
                        PTR                0x06A3D530
                        SWORD                     1024
                        SWORD *             0x06A3D504
                        SQLLEN *            0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLColAttributesW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        2
                        UWORD                       18 <SQL_DESC_LABEL>
                        PTR                0x06A3D530
                        SWORD                     1024
                        SWORD *             0x06A3D504 (10)
                        SQLLEN *            0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLColAttributesW
                        HSTMT               0x004EE190
                        UWORD                        2
                        UWORD                       10 <SQL_DESC_UPDATABLE>
                        PTR                0x00000000
                        SWORD                        0
                        SWORD *             0x06A3D508
                        SQLLEN *            0x06A3D524

              TestODBC.vshost 3108-3198     EXIT  SQLColAttributesW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        2
                        UWORD                       10 <SQL_DESC_UPDATABLE>
                        PTR                0x00000000
                        SWORD                        0
                        SWORD *             0x06A3D508 (0)
                        SQLLEN *            0x06A3D524 (0)

              TestODBC.vshost 3108-3198     ENTER SQLDescribeColW
                        HSTMT               0x004EE190
                        UWORD                        3
                        WCHAR *             0x00000000
                        SWORD                        0
                        SWORD *             0x00000000
                        SWORD *             0x06A3D518
                        SQLULEN *           0x06A3D528
                        SWORD *             0x06A3D52C
                        SWORD *             0x06A3D500

              TestODBC.vshost 3108-3198     EXIT  SQLDescribeColW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        3
                        WCHAR *             0x00000000 <null pointer>
                        SWORD                        0
                        SWORD *             0x00000000
                        SWORD *             0x06A3D518 (8)
                        SQLULEN *           0x06A3D528 (15)
                        SWORD *             0x06A3D52C (0)
                        SWORD *             0x06A3D500 (1)

              TestODBC.vshost 3108-3198     ENTER SQLColAttributesW
                        HSTMT               0x004EE190
                        UWORD                        3
                        UWORD                       18 <SQL_DESC_LABEL>
                        PTR                0x06A3D530
                        SWORD                     1024
                        SWORD *             0x06A3D504
                        SQLLEN *            0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLColAttributesW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        3
                        UWORD                       18 <SQL_DESC_LABEL>
                        PTR                0x06A3D530
                        SWORD                     1024
                        SWORD *             0x06A3D504 (22)
                        SQLLEN *            0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLColAttributesW
                        HSTMT               0x004EE190
                        UWORD                        3
                        UWORD                       10 <SQL_DESC_UPDATABLE>
                        PTR                0x00000000
                        SWORD                        0
                        SWORD *             0x06A3D508
                        SQLLEN *            0x06A3D524

              TestODBC.vshost 3108-3198     EXIT  SQLColAttributesW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        3
                        UWORD                       10 <SQL_DESC_UPDATABLE>
                        PTR                0x00000000
                        SWORD                        0
                        SWORD *             0x06A3D508 (0)
                        SQLLEN *            0x06A3D524 (0)

              TestODBC.vshost 3108-3198     ENTER SQLGetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   6 <SQL_ATTR_CURSOR_TYPE>
                        SQLPOINTER          0x06A3D950
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   6 <SQL_ATTR_CURSOR_TYPE>
                        SQLPOINTER          0x06A3D950 (0) <SQL_CURSOR_FORWARD_ONLY>
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLGetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   6 <SQL_ATTR_CURSOR_TYPE>
                        SQLPOINTER          0x06A3DF14
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   6 <SQL_ATTR_CURSOR_TYPE>
                        SQLPOINTER          0x06A3DF14 (0) <SQL_CURSOR_FORWARD_ONLY>
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   9 <SQL_ROWSET_SIZE>
                        SQLPOINTER                 2
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   9 <SQL_ROWSET_SIZE>
                        SQLPOINTER                 2
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLGetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   9 <SQL_ROWSET_SIZE>
                        SQLPOINTER          0x06A3DF10
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   9 <SQL_ROWSET_SIZE>
                        SQLPOINTER          0x06A3DF10 (0)
                        SQLINTEGER                  -5
                        SQLINTEGER *        0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   5 <SQL_ATTR_ROW_BIND_TYPE>
                        SQLPOINTER               144 <unknown>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   5 <SQL_ATTR_ROW_BIND_TYPE>
                        SQLPOINTER               144 <unknown>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  23 <SQL_ATTR_ROW_BIND_OFFSET_PTR>
                        SQLPOINTER          0x06A3DF24
                        SQLINTEGER                  -4

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  23 <SQL_ATTR_ROW_BIND_OFFSET_PTR>
                        SQLPOINTER          0x06A3DF24
                        SQLINTEGER                  -4

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  23 <SQL_ATTR_ROW_BIND_OFFSET_PTR>
                        SQLPOINTER          0x00000000
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  23 <SQL_ATTR_ROW_BIND_OFFSET_PTR>
                        SQLPOINTER          0x00000000
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 0 <SQL_RD_OFF>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 0 <SQL_RD_OFF>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 1 <SQL_RD_ON>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 1 <SQL_RD_ON>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  23 <SQL_ATTR_ROW_BIND_OFFSET_PTR>
                        SQLPOINTER          0x071CC5B8
                        SQLINTEGER                  -4

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  23 <SQL_ATTR_ROW_BIND_OFFSET_PTR>
                        SQLPOINTER          0x071CC5B8
                        SQLINTEGER                  -4

              TestODBC.vshost 3108-3198     ENTER SQLBindCol
                        HSTMT               0x004EE190
                        UWORD                        1
                        SWORD                        1 <SQL_C_CHAR>
                        PTR                0x00000050
                        SQLLEN                    26
                        SQLLEN *            0x0000004C

              TestODBC.vshost 3108-3198     EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        1
                        SWORD                        1 <SQL_C_CHAR>
                        PTR                0x00000050
                        SQLLEN                    26
                        SQLLEN *            0x0000004C (BADMEM)

              TestODBC.vshost 3108-3198     ENTER SQLBindCol
                        HSTMT               0x004EE190
                        UWORD                        2
                        SWORD                        8 <SQL_C_DOUBLE>
                        PTR                0x00000078
                        SQLLEN                     8
                        SQLLEN *            0x00000074

              TestODBC.vshost 3108-3198     EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        2
                        SWORD                        8 <SQL_C_DOUBLE>
                        PTR                0x00000078
                        SQLLEN                     8
                        SQLLEN *            0x00000074 (BADMEM)

              TestODBC.vshost 3108-3198     ENTER SQLBindCol
                        HSTMT               0x004EE190
                        UWORD                        3
                        SWORD                        8 <SQL_C_DOUBLE>
                        PTR                0x00000088
                        SQLLEN                     8
                        SQLLEN *            0x00000084

              TestODBC.vshost 3108-3198     EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        3
                        SWORD                        8 <SQL_C_DOUBLE>
                        PTR                0x00000088
                        SQLLEN                     8
                        SQLLEN *            0x00000084 (BADMEM)

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   9 <SQL_ROWSET_SIZE>
                        SQLPOINTER                 1
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                   9 <SQL_ROWSET_SIZE>
                        SQLPOINTER                 1
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLExtendedFetch
                        HSTMT               0x004EE190
                        UWORD                        1 <SQL_FETCH_NEXT>
                        SQLLEN                     0
                        SQLULEN *           0x06A3DF08
                        UWORD *             0x071CC5F0

              TestODBC.vshost 3108-3198     EXIT  SQLExtendedFetch  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        1 <SQL_FETCH_NEXT>
                        SQLLEN                     0
                        SQLULEN *           0x06A3DF08 (1)
                        UWORD *             0x071CC5F0 (0)

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 0 <SQL_RD_OFF>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 0 <SQL_RD_OFF>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLExtendedFetch
                        HSTMT               0x004EE190
                        UWORD                        2 <SQL_FETCH_FIRST>
                        SQLLEN                     1
                        SQLULEN *           0x06A3E190
                        UWORD *             0x071CC5F0

              TestODBC.vshost 3108-3198     EXIT  SQLExtendedFetch  with return code -1 (SQL_ERROR)
                        HSTMT               0x004EE190
                        UWORD                        2 <SQL_FETCH_FIRST>
                        SQLLEN                     1
                        SQLULEN *           0x06A3E190
                        UWORD *             0x071CC5F0

                        DIAG [HY106] [FileMaker][FileMaker] Fetch type out of range (0)

              TestODBC.vshost 3108-3198     ENTER SQLSetStmtAttrW
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 1 <SQL_RD_ON>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     EXIT  SQLSetStmtAttrW  with return code 0 (SQL_SUCCESS)
                        SQLHSTMT            0x004EE190
                        SQLINTEGER                  11 <SQL_ATTR_RETRIEVE_DATA>
                        SQLPOINTER                 1 <SQL_RD_ON>
                        SQLINTEGER                  -6

              TestODBC.vshost 3108-3198     ENTER SQLFreeStmt
                        HSTMT               0x004EE190
                        UWORD                        0 <SQL_CLOSE>

              TestODBC.vshost 3108-3198     EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        UWORD                        0 <SQL_CLOSE>

              TestODBC.vshost 3108-3198     ENTER SQLParamOptions
                        HSTMT               0x004EE190
                        SQLULEN                    1
                        SQLULEN *           0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLParamOptions  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        SQLULEN                    1
                        SQLULEN *           0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLExecDirectW
                        HSTMT               0x004EE190
                        WCHAR *             0x071CA868 [      82] "SELECT Binding, SKU13, Contract_ID FROM "US Titles" WHERE Contract_ID > 1"
                        SDWORD                    82

              TestODBC.vshost 3108-3198     EXIT  SQLExecDirectW  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        WCHAR *             0x071CA868 [      82] "SELECT Binding, SKU13, Contract_ID FROM "US Titles" WHERE Contract_ID > 1"
                        SDWORD                    82

              TestODBC.vshost 3108-3198     ENTER SQLGetDiagFieldW
                        SQLSMALLINT                  3
                        SQLHANDLE           0x004EE190
                        SQLSMALLINT                  0
                        SQLSMALLINT              -1249
                        SQLPOINTER         0x06A3E164
                        SQLSMALLINT                  4
                        SQLSMALLINT *       0x00000000

              TestODBC.vshost 3108-3198     EXIT  SQLGetDiagFieldW  with return code 0 (SQL_SUCCESS)
                        SQLSMALLINT                  3
                        SQLHANDLE           0x004EE190
                        SQLSMALLINT                  0
                        SQLSMALLINT              -1249
                        SQLPOINTER         0x06A3E164
                        SQLSMALLINT                  4
                        SQLSMALLINT *       0x00000000

              TestODBC.vshost 3108-3198     ENTER SQLRowCount
                        HSTMT               0x004EE190
                        SQLLEN *            0x06A3E168

              TestODBC.vshost 3108-3198     EXIT  SQLRowCount  with return code 0 (SQL_SUCCESS)
                        HSTMT               0x004EE190
                        SQLLEN *            0x06A3E168 (-1)
              • 4. Re: ODBC throwing exception in VB.Net
                actualjon

                It certainly shouldn't be crashing, but I do see that you're doing a rs.MoveFirst on a forward-only cursor.  According to the ODBC API, the only valid cursor operation on a forward-only cursor is "move next".

                When you execute a query, you can just assume that the cursor is already place at the "first" record.  So, you should be able to just delete the rs.MoveFirst line from your test case.

                 

                Jonathan

                • 5. Re: ODBC throwing exception in VB.Net
                  AlastairMcInnes

                  Hmm. Hadn't thought about the cursor. 

                  That would certainly explain why it works without the move first.

                  Many thanks.