joshslaton Newbie Poster

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

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

joshslaton

[EDITED]
i mentioned about inserting/updating

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

INSERT:
[CODE]
INSERT into (databasename) (fieldname) value __?___

UPDATE:
____?____

[/CODE]

joshslaton Newbie Poster

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

[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)
fields
the fields have a value already
id_number = 2900876
first_name = alec
last_name = slaton
course = bsit
[/CODE]

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...