vb.net - SQL query in Visual Basic -


private sub button3_click(sender object, e eventargs) handles button3.click         dim con new oledbconnection("provider=microsoft.ace.oledb.12.0;data source=c:\users\blackhat\documents\travel.accdb")         dim qry string = "update login set username='" & textbox1.text & "',password='" & textbox2.text & "' id=" & val(textbox3.text)         dim cmd new oledbcommand(qry, con)         con.open()         cmd.executenonquery()         msgbox(qry)         con.close()     end sub 

i passing in correct values variables, keep getting following error - what's issue?

an unhandled exception of type 'system.data.oledb.oledbexception' occurred in system.data.dll

additional information: syntax error in update statement.

try this:

dim qry string ="update login set username='" & textbox1.text & "',password='" & textbox2.text & "' id=" & val(textbox3.text) & "" 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -