Error SQL INSERT INTO with Odbc Command C#
Scenario: I want to input data from textbox into the database based on microsoft data base (.mdb) I already searching and find good clue and my result was here. This Code below was inside command button click event: using (OdbcConnection conn= new OdbcConnection()) { conn.ConnectionString = @"Driver={Microsoft Access Driver (*.mdb)};" + "Dbq=C:\\BlaBlaBla.mdb;Uid=Admin;Pwd=;"; conn.Open(); using (OdbcCommand cmd = new OdbcCommand( "INSERT INTO TABLENAME (FIELD1,FIELD2,FIELD3) VALUES ('" + txtFIELD1Input.Text + "','" + txtFIELD2Input.Text + "','" + txtFIELDInput.Text + "' )", conn)) { cmd.Execu
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.