Im always getting Invalid Column, check the database and it's all correct.

     Dim borrowed As String = "Yes"
        dataopen()
        comm.Connection = conn
        comm.CommandText = "UPDATE Equipment SET Borrowed = '" & borrowed & "' WHERE EQID = '" & eid & "'"
        comm.ExecuteNonQueryAsync()
        comm.Dispose()
        conn.Close()

Recommended Answers

All 3 Replies

Please post the SQL code to create the database.

What's the error? What is the datatype of Borrowed Fields? a bit or String? Try to remove the single quote from the query, on the Borrowed value

  Dim borrowed As String = "Yes"
        dataopen()
        comm.Connection = conn
        comm.CommandText = "UPDATE Equipment SET Borrowed = " & borrowed & " WHERE EQID = '" & eid & "'"
        comm.ExecuteNonQueryAsync()
        comm.Dispose()
        conn.Close()

put the value borrowed in single quotes...

UPDATE Equipment SET Borrowed = '" & borrowed & "' WHERE EQID = '" & eid & "'"
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.