Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Access database witihin ISP restrictions 1

Status
Not open for further replies.

MdotButler

Programmer
Jan 18, 2006
104
US
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.
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
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.
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.
To work within these restrictions what options do I have? What type of ASP.NET database functionality is left?

 
I normally do use connection strings and do encrypt them, especially if I am using user names and passwords.

Thanx for the suggestion but the question is how to update the Access database with the ISP limitations of not using ODBC or OLEDB methods.
 
Hi,
What else does the FAQ say about "unmanaged code" - it refers to a previous mention..

Clearly you can access the database if queries work, so it must be something else...




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Although the directory was wrte/update enabled, the actual Access Database had to have the permissions changed as well. Thanx for the help Mark... :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top