using DataSet
-
hello i write this code from differnt examples.i want to use dataset in my code but i think dataset is working but this code is inserting data into my table tell me how i can i modify to get benefit of dataset. plz help me soon. Dim mycon As OdbcConnection Dim ds As New DataSet mycon = New OdbcConnection("DSN=BLTPS;APP=Microsoft® Visual Studio .NET;WSID=BLHOMEPC;DATABASE=BLTPS;Trusted_Connection=Yes") Dim selectString As String = "SELECT * FROM icloct" mycon.Open() Dim myOdbcCommand As New OdbcCommand myOdbcCommand.Connection = mycon Dim adapter As OdbcDataAdapter adapter = New OdbcDataAdapter(selectString, mycon) adapter.SelectCommand = New OdbcCommand(selectString, mycon) adapter.Fill(ds, "icloct") myOdbcCommand.CommandText = "INSERT INTO icloct(locid, locdes, adduser, adddate, addtime)VALUES ('klm','yes', '', '', '')" adapter.InsertCommand = myOdbcCommand myOdbcCommand.ExecuteNonQuery() adapter.Update(ds, "icloct") mycon.Close()