Opening 16 bit Access 2.0 tables from 32 bit VB code

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by John Calissendorf » Fri, 25 Aug 2000 04:00:00



Hi,

When trying to open a recordset object in a 16-bit Access 2.0 database from
a 32 bit VB application I get an error that says 'Record(s) can't be read;
no Read Data Permission on 'tblname'.  I can open the table in Access 97
with no permission problems.  My guess is that the problem relates to not
pointing to the workgroup file.

Here is a stripped-down code-snippet of the code that I am using:

  Dim wrkJet As Workspace
  Dim dbsJet As Database
  Dim rstTable As Recordset

  Set wrkJet = DBEngine.Workspaces(0)
  Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
  Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"

Thank you in advance for any help that you may offer.

John

 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by Douglas J. Steel » Fri, 25 Aug 2000 04:00:00


Do you have security on the database? If not, then the workgroup file
shouldn't really matter.

I haven't tried going back to Access 2.0 from 32-bit clients, so I'm afraid
I can't offer any other suggestions.

--

Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://I.Am/DougSteele/


Quote:> Hi,

> When trying to open a recordset object in a 16-bit Access 2.0 database
from
> a 32 bit VB application I get an error that says 'Record(s) can't be read;
> no Read Data Permission on 'tblname'.  I can open the table in Access 97
> with no permission problems.  My guess is that the problem relates to not
> pointing to the workgroup file.

> Here is a stripped-down code-snippet of the code that I am using:

>   Dim wrkJet As Workspace
>   Dim dbsJet As Database
>   Dim rstTable As Recordset

>   Set wrkJet = DBEngine.Workspaces(0)
>   Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
>   Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"

> Thank you in advance for any help that you may offer.

> John


 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by John Calissendorf » Fri, 25 Aug 2000 04:00:00


There is no security on the database.  I can open it in Access 2.0 without
specifying a user name and password, and I can open it in Access 97 with no
problem.



Do you have security on the database? If not, then the workgroup file
shouldn't really matter.

I haven't tried going back to Access 2.0 from 32-bit clients, so I'm afraid
I can't offer any other suggestions.

--

Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://I.Am/DougSteele/


Quote:> Hi,

> When trying to open a recordset object in a 16-bit Access 2.0 database
from
> a 32 bit VB application I get an error that says 'Record(s) can't be read;
> no Read Data Permission on 'tblname'.  I can open the table in Access 97
> with no permission problems.  My guess is that the problem relates to not
> pointing to the workgroup file.

> Here is a stripped-down code-snippet of the code that I am using:

>   Dim wrkJet As Workspace
>   Dim dbsJet As Database
>   Dim rstTable As Recordset

>   Set wrkJet = DBEngine.Workspaces(0)
>   Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
>   Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"

> Thank you in advance for any help that you may offer.

> John

 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by David Drak » Sun, 27 Aug 2000 04:00:00


Attach the Access 2.0 database to an Access 2000 database.
 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by John Calissendorf » Tue, 29 Aug 2000 04:00:00


I tried attaching the Access 2.0 tables to an Access 97 (32-bit) database
and ran into the same permission error.

Thanks,
John


Attach the Access 2.0 database to an Access 2000 database.

 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by z » Fri, 01 Sep 2000 03:35:04


hi:
   I have a code that work from win98 to use access 2.0 database. Try
this.

Dim mydb As Database, temp_data As Recordset, Data1 As Recordset
'Set mydb = Workspaces(0).OpenDatabase("D:\data1.mdb")
'Set temp_data = mydb.OpenRecordset("select tasktype     from tasktypes
where STATUS ='ACTIVE' order by sequence ASC ")  ' Open Recordset.



> There is no security on the database.  I can open it in Access 2.0 without
> specifying a user name and password, and I can open it in Access 97 with no
> problem.



> Do you have security on the database? If not, then the workgroup file
> shouldn't really matter.

> I haven't tried going back to Access 2.0 from 32-bit clients, so I'm afraid
> I can't offer any other suggestions.

> --

> Doug Steele, Microsoft Access MVP
> Beer, Wine and Database Programming. What could be better?
> Visit "Doug Steele's Beer and Programming Emporium"
> http://I.Am/DougSteele/



> > Hi,

> > When trying to open a recordset object in a 16-bit Access 2.0 database
> from
> > a 32 bit VB application I get an error that says 'Record(s) can't be read;
> > no Read Data Permission on 'tblname'.  I can open the table in Access 97
> > with no permission problems.  My guess is that the problem relates to not
> > pointing to the workgroup file.

> > Here is a stripped-down code-snippet of the code that I am using:

> >   Dim wrkJet As Workspace
> >   Dim dbsJet As Database
> >   Dim rstTable As Recordset

> >   Set wrkJet = DBEngine.Workspaces(0)
> >   Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
> >   Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"

> > Thank you in advance for any help that you may offer.

> > John

 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by John Calissendorf » Sat, 02 Sep 2000 02:59:40


I have already tried pretty much every variation of the 'OpenDatabase'
method with no success.  This problem relates to the different security
models between 16-bit and 32-bit Access.  It is not a VB/DAO syntax issue.

Thanks,
John


hi:
   I have a code that work from win98 to use access 2.0 database. Try
this.

Dim mydb As Database, temp_data As Recordset, Data1 As Recordset
'Set mydb = Workspaces(0).OpenDatabase("D:\data1.mdb")
'Set temp_data = mydb.OpenRecordset("select tasktype     from tasktypes
where STATUS ='ACTIVE' order by sequence ASC ")  ' Open Recordset.



> There is no security on the database.  I can open it in Access 2.0 without
> specifying a user name and password, and I can open it in Access 97 with
no
> problem.



> Do you have security on the database? If not, then the workgroup file
> shouldn't really matter.

> I haven't tried going back to Access 2.0 from 32-bit clients, so I'm
afraid
> I can't offer any other suggestions.

> --

> Doug Steele, Microsoft Access MVP
> Beer, Wine and Database Programming. What could be better?
> Visit "Doug Steele's Beer and Programming Emporium"
> http://I.Am/DougSteele/



> > Hi,

> > When trying to open a recordset object in a 16-bit Access 2.0 database
> from
> > a 32 bit VB application I get an error that says 'Record(s) can't be
read;
> > no Read Data Permission on 'tblname'.  I can open the table in Access 97
> > with no permission problems.  My guess is that the problem relates to
not
> > pointing to the workgroup file.

> > Here is a stripped-down code-snippet of the code that I am using:

> >   Dim wrkJet As Workspace
> >   Dim dbsJet As Database
> >   Dim rstTable As Recordset

> >   Set wrkJet = DBEngine.Workspaces(0)
> >   Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
> >   Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"

> > Thank you in advance for any help that you may offer.

> > John

 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by Joe Banan » Sun, 03 Sep 2000 03:43:46


Have you tried all this without using the Workspace object?

- Ed



>hi:
>   I have a code that work from win98 to use access 2.0 database. Try
>this.

>Dim mydb As Database, temp_data As Recordset, Data1 As Recordset
>'Set mydb = Workspaces(0).OpenDatabase("D:\data1.mdb")
>'Set temp_data = mydb.OpenRecordset("select tasktype     from tasktypes
>where STATUS ='ACTIVE' order by sequence ASC ")  ' Open Recordset.



>> There is no security on the database.  I can open it in Access 2.0 without
>> specifying a user name and password, and I can open it in Access 97 with no
>> problem.



>> Do you have security on the database? If not, then the workgroup file
>> shouldn't really matter.

>> I haven't tried going back to Access 2.0 from 32-bit clients, so I'm afraid
>> I can't offer any other suggestions.

>> --

>> Doug Steele, Microsoft Access MVP
>> Beer, Wine and Database Programming. What could be better?
>> Visit "Doug Steele's Beer and Programming Emporium"
>> http://I.Am/DougSteele/



>> > Hi,

>> > When trying to open a recordset object in a 16-bit Access 2.0 database
>> from
>> > a 32 bit VB application I get an error that says 'Record(s) can't be read;
>> > no Read Data Permission on 'tblname'.  I can open the table in Access 97
>> > with no permission problems.  My guess is that the problem relates to not
>> > pointing to the workgroup file.

>> > Here is a stripped-down code-snippet of the code that I am using:

>> >   Dim wrkJet As Workspace
>> >   Dim dbsJet As Database
>> >   Dim rstTable As Recordset

>> >   Set wrkJet = DBEngine.Workspaces(0)
>> >   Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
>> >   Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"

>> > Thank you in advance for any help that you may offer.

>> > John

 
 
 

Opening 16 bit Access 2.0 tables from 32 bit VB code

Post by John Calissendorf » Sun, 03 Sep 2000 09:24:19


Yes.


Have you tried all this without using the Workspace object?

- Ed



>hi:
>   I have a code that work from win98 to use access 2.0 database. Try
>this.

>Dim mydb As Database, temp_data As Recordset, Data1 As Recordset
>'Set mydb = Workspaces(0).OpenDatabase("D:\data1.mdb")
>'Set temp_data = mydb.OpenRecordset("select tasktype     from tasktypes
>where STATUS ='ACTIVE' order by sequence ASC ")  ' Open Recordset.



>> There is no security on the database.  I can open it in Access 2.0
without
>> specifying a user name and password, and I can open it in Access 97 with
no
>> problem.



>> Do you have security on the database? If not, then the workgroup file
>> shouldn't really matter.

>> I haven't tried going back to Access 2.0 from 32-bit clients, so I'm
afraid
>> I can't offer any other suggestions.

>> --

>> Doug Steele, Microsoft Access MVP
>> Beer, Wine and Database Programming. What could be better?
>> Visit "Doug Steele's Beer and Programming Emporium"
>> http://I.Am/DougSteele/



>> > Hi,

>> > When trying to open a recordset object in a 16-bit Access 2.0 database
>> from
>> > a 32 bit VB application I get an error that says 'Record(s) can't be
read;
>> > no Read Data Permission on 'tblname'.  I can open the table in Access
97
>> > with no permission problems.  My guess is that the problem relates to
not
>> > pointing to the workgroup file.

>> > Here is a stripped-down code-snippet of the code that I am using:

>> >   Dim wrkJet As Workspace
>> >   Dim dbsJet As Database
>> >   Dim rstTable As Recordset

>> >   Set wrkJet = DBEngine.Workspaces(0)
>> >   Set dbsJet = wrkJet.OpenDatabase("dbname", False, True)
>> >   Set rstTable = dbsJet.OpenRecordset("SELECT tblname.* FROM tblname]"

>> > Thank you in advance for any help that you may offer.

>> > John

 
 
 

1. HELP: ...in converting 16-bit access db to 32-bit using VB not ACCESS 97

I am able to convert the tables, fields, and indexes in an existing 16-bit
ACCESS 2.0 database by looping through the VB database collections object
for the 16-bit database...BUT I cannot get the RELATIONSHIPS transferred
over.

Is there any way to convert a database from 16-bit to 32-bit that you you
guys know of?  Any OLE methods, WIN API, etc?

Thank you very much!

Scott Huggins

2. Master Detail Form

3. ORACLE forms going from 16 bit code to 32 bit code

4. Access 97 - Query to condense 1:Many relationship to one line per master record?

5. Connect 16-bit VB app to 32-bit Access 97 DB

6. pgsql/src/backend/port/dynloader freebsd.h

7. 16 bit and 32 bit open client

8. test - ignore

9. VB 16 bit vs 32 bit on NT machine

10. Data Director to VB, 16 bit, 32 bit or both

11. corruption of 16 bit db when used by both 16 and 32 bit apps

12. 16 bit and 32 bit BDE with same table

13. 16 Bit app trying to access 32 bit ODBC driver