Ive got some information that i want to be sent to the database, first the information is taken from the database to the textboxes which works, i will then be able to edit the text, and send back to the database, ive got the Command all coded but when i type in the new data, and the button is clicked it jus refreshes back with the old data.. no data is saved to the database, if anyone can help heres the code..

Dim strSQL As String = "UPDATE bloginformation SET Title ='" & txtTitle.Text & "', Information ='" & txtInformation.Text & "' WHERE blogid=" & Label3.Text & ""
               Dim Cmd As New OleDbCommand(strSQL, Connection)
        Cmd.ExecuteReader()
        Connection.Close()

My connection is working fine, and also used a breakpoint to see if they were holding any values and they was, its just not updating please help me thanks

Insted of use cmd.ExecuteReader() use cmd.ExecuteNonQuery(), ExecuteNonQuery Return an integer on how many rows were affected by that query.

Insted of use cmd.ExecuteReader() use cmd.ExecuteNonQuery(), ExecuteNonQuery Return an integer on how many rows were affected by that query.

Already tried that , didnt work lol.. ive tried page.ifpostback aswell but that isnt working either

Did you open the connection before you do the ExecuteNonQuery()?

Dim Cmd As New OleDbCommand(strSQL, Connection)
Connection.Open()
Cmd.ExecuteNonQuery()
Connection.Close()

if that does not work i would say try to pass a straightforward statement, just to make sure the statement is not wrong.

Page ispostback maybe you want to do that in page load event.

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.