what is the dao equivalent to inserting and editing records in c# .net?
I was wondering if there is an equivalent to the DAO style insert and update record code in C#. For instance, in access VBA, I could do an insert with something like this:
dim db As DAO.Database
dim rs As DAO.Recordset
Set db = CurrentDatabase
Set rs = db.OpenRecordset("tableName")
With rs
.add
.Fields("column1") = Textbox.Value
.update
End With
Is there something similar in C# .ne开发者_如何学Pythont?? i know how to do it with parameterized queries, but for what I'm doing, it seems like the old DAO way would be quicker.
Since VB.Net and C# .Net share the same framework... .Net it's pretty easy. It's going to look something like:
DAO.Database db = CurrentDatabase();
DAO.Recordset rs = db.OpenRecordset("tableName");
rs.add();
rs.Fields["column1"] = Textbox.Value ;
rs.update();
精彩评论