Private  sub button1_click( )

Data Set

Dim ds as new dataset
Ds = new dataset(“student”)


Dim connectionstring as string = “provider =Microsoft.jet.oledb.4.0;data source = student”;
Dim connection1 as oledb.oledbconnection = new oledb.oledbconnection(connectionstring)

Command object

Dim command1 as oledb.oledbcommand = new oledb.oledbcommand(“select * from student”)
Command1.commandtype = command.text
Comand1.connection = connection1

Data Adapter

Dim dataadapter1 as oledb.oledbdataadapter = new oledb.oledbdataadapter

Dear above code is used by me .in this code I have created dataset,command ,dataadapter,connection object’s.i have taken MS access database with 2005.this code only display record from database but when I want to add,delete,update record ‘It generate error that is a specific update,delete,insert command is required’ .so this is the main problem with me which leds frustrate me since last 6six month .i humbly request to all that if anybody can help me for this problem pls guide me with proper code of all with display record in texbox,combobox and Radiobutton.

1 I want ot insert new record in database.(In textbox,combobox,radiobutton)
2 I want to delete record from database(In textbox,combobox,radiobutton)
3 I want to update record . (In textbox,combobox,radiobutton)

Edited 7 Years Ago by Nick Evan: Add code-tags

Hi , As you are specified command for filling datatable for the adapter, you have to specify for Insert (Dataadapter1.InsertCommand),update (Dataadapter1.UpdateCommand),Delete (Dataadapter1.DeleteCommand)command for that adapter also.

A Roy Chowdhury

This article has been dead for over six months. Start a new discussion instead.