Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

MS Access database from asp.net

$
0
0

I am looking for a tutorial or sample for asp.net (vb 2010) connecting to MS access database, new, update, & delete record. I have done classic ASP where code would be:

New:
rsAddRecord.Open strSQL, adoCon
rsAddRecord.AddNew
rsAddRecord.update

Update:
strSQL = "SELECT Table1.* from Table1 where ID=" & theRecordNo
rsUpdate.Fields("Submitted") = "True"
rsUpdate.Update

Delete:
strSQL = "SELECT Table1.* from Table1 where ID=" & theRecordNo
rsDeleteRecord.LockType=3
rsDeleteRecord.Open strSQL, adoCon
rsDeleteRecord.Delete

I have read the MS position on MS Access (buy SQL):
It is not recommended to use an Access database in a production web application. For production purposes, consider connecting to a Microsoft™ SQL Server database using the SqlDataSource or ObjectDataSource controls.

I get as far as configuring the AccessDataSource, but then I draw a blank. Is there a simple tut somewhere that shows how to connect, create, update, & delete records in MS access database. I just want to display the data once stored and retrieved. Nothing extravagant. I am not using data aware controls. I just want to learn the ASP.net version of what I can already do with classic ASP.

Thanks


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>