Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Connection
Message
De
11/12/2001 10:32:45
 
 
À
10/12/2001 22:39:19
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Divers
Thread ID:
00592465
Message ID:
00592657
Vues:
14
Hi,

I am sorry. How do I create the UDL file? I do not have Visual Studio loaded on my system, so I do not have VB IDE.

Any case I have not opened the MDB file in access. Still it gives that error. Surprisingly, if I open another MDB file and create a test module with following code, it goes through further without any error. That is, within Access I have no problem opening ADO recordset from any other MDB file but I could not open through ASP file.

Any more ideas?

Thanks once again.


>Is there anybody else using the database? Or maybe you have it open in Access?
>
>Try adding "Mode=Share Deny None" to your connection string to make sure you open the MDB in shared mode. Also always close the connection explicitly before your script finishes.
>
>If this does not work try creating your connection string with a UDL file including UID and PWD and after you save it open it with Notepad to copy and paste the correct connection string.
>
>>Hi,
>>
>>I am trying to develop a search page for our website using ASP/Vbscript. I have an Access2000 database which is secured with a username and password. My following code does not work.
>>
>>
>>	   Dim oConn		
>>	   Dim oRs		
>>	   Dim filePath		
>>	   Dim Index
>>	   Dim cQueryStr
>>	   Dim eExpr
>>	   Dim cSQLStr
>>
>>	
>>	   filePath = [C:\InetPub\wwwroot\oamslite.mdb]
>>
>>	   Set oConn = Server.CreateObject([ADODB.Connection])
>>	   oConn.Open [Provider=Microsoft.Jet.OLEDB.4.0;Data Source=] & filePath
>>
>>	   Set eExpr = Request.form([custid])
>>	   If eExpr <> [] Then
>>	      cQueryStr = [custnum = '] & eExpr & [']
>>	   End If
>>			
>>	   cSQLStr = [Select * from VLCTests]
>>	   If cQueryStr <> [] Then
>>	      cSQLStr = cSQLStr & [ WHERE ] & cQueryStr
>>	   End If
>>			
>>	   Set oRs = oConn.Execute(cSQLStr)
>>
>>
>>Note: In the above code I have replaced all the double quotes with [] characters as this thread did not allow me to post as is.
>>
>>The error I am getting in the browser is 'The Microsoft Jet database engine cannot open the file 'C:\InetPub\wwwroot\OAMSLITE.mdb'. It is already opened exclusively by another user, or you need permission to view its data.'
>>
>>Is the connection string wrong? Or should I use some other method. I tried giving the userid and password something like:
>>
>>oConn.Open 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' & filePath, 'Admin', 'xxx'
>>
>>But still does not work. Any help would be much appreciated.
>>
>>Thanks & regards
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform