Author: shafaatmosvi | Posted on: 10/20/2010 1:59:38 PM | Views : 245

How could I get the total number of records present in a database table through asp.net in VB? I know about setting up and opening a connection. I wanted to loop through records, so wanted to know the number of records present. How could that be done? 
Also, I used statements like 'Update' and 'Insert Into' to to change the data in my data source. Like I updated a certain field like this:
ds.Tables("tblUsers").Rows(2)(3) = "xyzzzz" 
and then I executed an sql statement on the same field like this: 
objCmd.UpdateCommand = new OleDbCommand
objCmd.UpdateCommand.CommandText = "Update tblUsers " & _
"SET City='xyzzzz' WHERE UserID=3"  
objCmd.UpdateCommand.Connection = Conn
objcmd.update(ds,"tblusers")
(where objcmd is an instance of oledbdataadapter object)


What should I do to delete a record or a field in a data sou ...

Go to the complete details ...