PDA

Click to See Complete Forum and Search --> : Worst error ive ever seen. Surprised if some1 can help here


SmagO
Jun 9th, 2001, 04:21 PM
Hi all
I have been developing this web thingy using ASP and it all works fine on my PC with Personal Web Server. I then put it on th server at my university and pout it live.

Initially it worked bu then...
No all of a sudden I get this error every time this bit of code is meant to execute
code:
set objDBConnection=server.CreateObject("ADODB.connection")
OBJdbConnection.Open "forum"


"forum" is an access databse (saved as access 97). It has been put in the systems DSN (ODBC) correctly.

Th error I get is

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.
/scripts/witsfor/forum.asp, line 15


No it cannot be opened by another user because I am the only user. I just can't believe it is doing this to me.
Soo much depends on this working for me...please help!!!!!!

monte96
Jun 9th, 2001, 11:25 PM
Are you sure that you don't have it open in another session that has not yet terminated?

Access is just not cut out for this. It is meant as a desktop database solution. SQL Server is much better suited for access through a web app.

SmagO
Jun 10th, 2001, 04:57 AM
Sure Access is not cut out for it, but its all I have. How would I terminate that other session...assuming it is still open. Altho somehow I dont feel that is the problem here.
Thanks in advance

Sadovod
Jun 10th, 2001, 12:57 PM
It has to be that your connection is already open, or not closed, if you like.
Why not to try something like following :


If cn.State <> adStateOpen Then
'open it
else
'don't
End If

SmagO
Jun 10th, 2001, 04:57 PM
Thanks...i'll try that but
Is it true that if i reset the server all sessions and any open connections should be closed. And if i do reset the server and get the same error it would mean there is another problem?

kayoca
Jun 11th, 2001, 04:47 AM
Why not try this

Set objDBConnection = Server.CreateObject("ADODB.Connection")
objDBConnection.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + _
Server.MapPath("DB.MDB"))

So you can execute a SQL statement.

objDBConnection.Execute "SELECT * FROM Forums"