ASP with database problems everyone help out ah
Users questions: I want to learn asp dynamic pages, but the normal configuration environment, connect access database to run web browser does not show how, I also installed a data-driven, the browser displays an error type: MicrosoftOLEDBproviderODBCfor Drivers [0x80004005] [microsoft] ODBC [MicrosoftAccessDriver] can not use '[unknown]'; file already in use in this is how the matter can restart the computer running, but there is another way out The problem, then reboot and you can get for a while ...
Experts answer: may be your ACCESS database deadlock. If: A code that reads the database, exclusive, do not close the B Code, to read the database, etc. A must to read off the code has not shut down when A, B can not read the code, they become a dead Lock **************************** give you a read:% dimConnStr, ConnConnStr = "Provider = Microsoft.Jet.OLEDB. 4.0; Data Source= &Server.MapPath( myData.mdb )SetConn=Server.CreateObject( ADODB.Connection )Conn.openConnStr % To myData.mdb to your database name. Please note that the cursor data set, this data is added * update: setrs = server.createobject ("adodb.recordset") rs.opensql, co nn, 1,3 not only update the data can be read using: setrs = server.createobject ("adodb.recordset") rs.opensql, conn, 1,1 any case, after use, should be close to the Like the release of resources: rs.closesetrs = nothingconn have closed: conn.closeSetconn = nothing ******************************* ******* - Finally, to give you a simple example of the complete code:% dimConnStr, ConnConnStr = "Provider = Microsoft.Jet.OLEDB.4.0; DataSource =" & Server.MapP eateobject ("adodb.recordset") rs.open "select * from table", conn, 1,1 response.write (rs ("Field Name")) rs.closesetrs = n othingsetrs = server.createobject ("adodb.recordset") rs.open "select * from table", conn, 1,3 rs.addnewrs ("Field Name") =