Hi, if I connected access data base to vb form and I want to insert value of dropdown list(Items are yes and no) into the data base (field is type of Yes/No) what will be the insert statement?!

cmcontact.CommandText = ("insert into table1_local(y/n) values (" + Me.DropDownList1.SelectedValue + ");")

I got syntax error.. I tried to put the drop down list values 1 and 0 also I tried to put them true and false both times I got error

you have dropdownlist with value Yes and No. you want to insert selected value in dropdownlist to db.

cmcontact.CommandText = "INSERT INTO TableName(ColumnName) VALUES('" & Me.DropDownList1.SelectedValue & "')"

What kind of error was come?

I found the solution!
my column name was y/n
this contains special char (/) when i removed this char it worked
thanx any way

This question has already been answered. Start a new discussion instead.