I received this error whenever I update an int(3) type field.

Error: 438 public member close on type integer not found

This is my code

conn.ConnectionString = "server=localhost;user id=root;password=;database=test"
        SQL = "UPDATE testTable SET int = 1 WHERE Name= 'Bob'"
        Try

            Dim myData
            With myCommand
                .Connection = conn
                .CommandText = SQL

                conn.Open()

                myData = .ExecuteNonQuery()

                .Dispose()
                conn.Close()

                myData.Close()
            End With

        Catch ex As Exception
                 MsgBox("Error")
        End Try

If I remove line 17. myData.Close, the error disappears. I think that it is important to keep that line. Anyway around this?

How come I can't edit my own post?

Anyway, is myData.Close() really that important?

BUMP

Can anyone tell me why I am getting the error with myData.Close()? And not get the error without it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.