Hi,
I used to work a lot with classic asp. I'm currently trying the ASP.NET MVC and like it so far, but I'm missing the simple usage of the ADODB Connection. I was searching the web, for any simple and clear solution like the code below, used on classic ASP, but everything I found was way more complicated and/or not with ADODB on C#. I want Recordsets, no "UPDATE.." SQLs, Column("Name") not Column[0], and so on... Is all of this gone?
Set db = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
db.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("data.mdb")
rs.Open "select * from test;", db, 1, 3
rs.AddNew
rs("text") = "Hello World!"
rs.Update
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
I know there are ObjectMappers, etc... But I would like to use the ADODB Connection with Recordsets the old fashion way. So please no anwsers, dont use it, its old or to slow etc. I'm aware of these things. Is it still possible and is there any simple working example with code.
Thanks.