Private sub button1_click( ) Data Set Dim ds as new dataset Ds = new dataset(“student”) Connectionstring 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 Connection1.open() Comand1.connection = connection1 Data Adapter Dim dataadapter1 as oledb.oledbdataadapter = new oledb.oledbdataadapter Dataadapter1.selectcommand=command1 Dataadapter1.tablemappings.add(“table’,”student”) Dataadapter1.fill(ds) Datagrid1.setbindings(ds,”table”)
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 vb.net 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