error of reading with ADO



I hava a database mdb protected by username ad password.

I create as administrator a temprary database .mdb without username and
password
and through a Ado connection I create a table with a query created from
the protected database.
With a new connection to the unprotectd database I want to exprot
records through a string SQL
the records but I found a message
"Impossibile leggere record. authorization of reading not available for
"TmpToExcel"

If I open the mdb file with access and create a query with the same
text it is good

thank you in advance

Marro

' 3- creazione temp.mdb
If CreateNewMDB_ADO(sPathToExcel, "Temp", 5) Then
' 4- eseguo la la query di creazione tabella TmpToExcel in
temp.mdb
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sPathDatabase & "\" &
sDatabase & ";" & _
"User ID=" & sUser & ";" & _
"Password=" & sPwd
cn.Properties("Jet OLEDB:System Database") = sPathDatabase &
"\" & sDataGroup
cn.Open
Dim sQueryCreaTabella As String

' Select campi INTO NomeNuovaTabella IN path+nomemdb FROM
qtoExcel
sQueryCreaTabella = "SELECT * INTO TmpToExcel " & " IN " & _
Chr(34) & sPathToExcel & "\Temp.mdb " &
Chr(34) & _
"FROM qToExcel"
cn.Execute sQueryCreaTabella
cn.Close
' 5- esporto i dati "from tabella creata" (TmpToExcel) in excel
Dim sSqlTabToExcel As String

Set cnTemp = New ADODB.Connection
'cnTemp.CursorLocation = adUseClient
cnTemp.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" &
_
"Data Source=" & sPathToExcel & "\" &
"Temp.mdb;"
cnTemp.Open
sSqlTabToExcel = "SELECT * INTO [Excel 8.0;Database=" & _
sPathToExcel & "\AnalisiDati.xls].[MieiDati]
FROM TmpToExcel"

cnTemp.Excecute sSqlTabToExcel
<<<<<<-------------------------------------------------------------

.



Relevant Pages

  • (no subject)
    ... - LDB locking which a persistent recordset connection fixes ... New format of Access 2000 MDB ... Place backend MDB on the root of the network share rather than several folders down ... Subdatasheets are a new feature in Access 2000 Therefore, you are more likely to notice this behaviour after you convert a database from an earlier version. ...
    (comp.databases.ms-access)
  • Re: Connection to Access Database Problem
    ... UserName & Password are OK as I have to enter them when I open ... Originally the mdb didn't have any userid/password set (which is how I had ... I've just deleted the above connection and tried setting up a new one. ... Like it isn't even looking at the database. ...
    (borland.public.delphi.database.ado)
  • Re: temp db
    ... If the database is not in use, you can create a copy just by copying the MDB ... The purpose is to create a temp db for all the ... ' This subroutine illustrates how to use a temporary MDB in your app. ...
    (microsoft.public.access.formscoding)
  • RE: Access to Access Automatic Updates
    ... Then navigate to the database from the File Open dialog and open it. ... You will need to do it for mdb that has tables you need ... MS Office Master 2000 ed. ... you will need to create a form that opens on ...
    (microsoft.public.access.externaldata)
  • RE: Access to Access Automatic Updates
    ... MS Office Master 2000 ed. ... Then navigate to the database from the File Open dialog and open it. ... You will need to do it for mdb that has tables you need ... you will need to create a form that opens on ...
    (microsoft.public.access.externaldata)