0

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?

1
Contributor
3
Replies
4
Views
7 Years
Discussion Span
Last Post by yorro
0

How come I can't edit my own post?

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

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.