joshslaton Newbie Poster

[CODE]ODBC_COM = New OdbcCommand("UPDATE President SET '" & President_UPDATE_field.Text & "'='" & President_UPDATE_text.Text + "'", ODBC_CON)

i dont know why im having error like this, what i know is my syntax for UPDATE command is correct and im using correct number of single quotes and double quotes


i mentioned about inserting/updating

heres the partial code that i know, could anyone please supply, if it is lacking something or wrong.....

INSERT into (databasename) (fieldname) value __?___



joshslaton Newbie Poster

Hello, everyone.....
its not an issue about how to connect to access using odbc since i did it already:
Imports System.Data.Odbc
Dim ODBC_CON As New OdbcConnection("dsn=DBMS Project")
Dim ODBC_READ As OdbcDataReader
Dim ODBC_COMM As OdbcCommand

[CODE]although my problem is the code on how to select/insert/modify or update commands,

my progress:(VB 2008)
-already have textbox named "idnumber"
-already have button named "proceed"

my progress: MS Access
-i have a file named "DBMS Project.accdb" or something
-it has a table named "user inside it"
-table "users" has (id_number,first_name,last_name,course)
the fields have a value already
id_number = 2900876
first_name = alec
last_name = slaton
course = bsit

i want to do is

1)select the id_number in the database and display it on the message box so i started it like this
[CODE]ODBC_COMM = New OdbcCommand("SELECT id_number FROM users",ODBC_CON)[/CODE]

but i have no idea how could i display it on the msgbox on the event that i clicked the button named "proceed"

i provided much information as i could and same with as the code, i just need guide, simplest one for me to understand,

thank you...