MdotButler
Programmer
I have some shopping cart code which updates a MS Access database using OLEDB as such. I can read the database using the following method, but cannot update anything.
In moving this code to a new site and new ISP it fails. After digging around through FAQs I find a blurb indicating this is due to ASP.NET restrictions.
Code:
Dim strSQL As String = "INSERT INTO BH (BH_BID) VALUES ('xxx')"
Dim strDSN As String = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("App_Data/Orders.mdb")
Dim myConn As New OleDbConnection(strDSN)
Dim myCmd As New OleDbCommand()
myCmd = New OleDbCommand(strSQL, myConn)
myConn.Open()
myCmd.ExecuteNonQuery()
myConn.Close()
myConn = Nothing
To work within these restrictions what options do I have? What type of ASP.NET database functionality is left?You will not be able to access an Microsoft Access database via ODBC or OLEDB because these procedures still contain the "unmanaged code" as mentioned before.