Access2.0 DB and VB4-16bit 
Author Message
 Access2.0 DB and VB4-16bit

Hi all,

I've a problem with VisualBAsic 4.0 16-bit and Access 2.0
When I want to access the database with

        sql = "SELECT * FROM table WHERE ..."
        set mytable = mydatabase.OpenRecordset(sql, dbOpenDynaset)

the result is only the first record from the table matching the
sql-query and the whole result (mytable.RecordCount) is 1. I can acces
the table with

        set mytable = mydatabase.OpenRecordset(tablename, dbOpenTable)

and everything works fine. But If I want to open the table with
'dbOpenDynaset' or 'dbOpenSnapshot' the result is only the first record.
And there is no error or warning message. I don't know what's the
problem.

Hope someone could help me.

Thx in advance.

CU

Matthias

--
Matthias Waltsgott                                      

Fakultaet Wirtschaftswissenschaften    
Studiengang Wirtschaftsinformatik      
Technische Universitaet Ilmenau                



Sat, 20 Nov 1999 03:00:00 GMT  
 Access2.0 DB and VB4-16bit

This behavior is by design.  To get an accurate recordcount, perform a =
movelast on the recordset.  The recordcount should then reflect the =
correct number.

--
David W. Forest
LAN Specialist
Information Technologies
Lear Corporation - Ford Division
SBN Level 2
http://www.concentric.net/~dforest/

If you're not scared, you don't understand.
 Matthias Waltsgott wrote in article =

Quote:
>Hi all,

>I've a problem with VisualBAsic 4.0 16-bit and Access 2.0
>When I want to access the database with

> sql =3D "SELECT * FROM table WHERE ..."
> set mytable =3D mydatabase.OpenRecordset(sql, dbOpenDynaset)

>the result is only the first record from the table matching the
>sql-query and the whole result (mytable.RecordCount) is 1. I can acces
>the table with

> set mytable =3D mydatabase.OpenRecordset(tablename, dbOpenTable)

>and everything works fine. But If I want to open the table with
>'dbOpenDynaset' or 'dbOpenSnapshot' the result is only the first =
record.
>And there is no error or warning message. I don't know what's the
>problem.

>Hope someone could help me.

>Thx in advance.

>CU

>Matthias

>--
>Matthias Waltsgott

>Fakultaet Wirtschaftswissenschaften
>Studiengang Wirtschaftsinformatik
>Technische Universitaet Ilmenau

>=20



Sat, 20 Nov 1999 03:00:00 GMT  
 Access2.0 DB and VB4-16bit

This sounds strange, you imited the Where clause in the where statment.
Please complete it.



Quote:
> Hi all,

> I've a problem with VisualBAsic 4.0 16-bit and Access 2.0
> When I want to access the database with

>    sql = "SELECT * FROM table WHERE ..."
>    set mytable = mydatabase.OpenRecordset(sql, dbOpenDynaset)

> the result is only the first record from the table matching the
> sql-query and the whole result (mytable.RecordCount) is 1. I can acces
> the table with

>    set mytable = mydatabase.OpenRecordset(tablename, dbOpenTable)

> and everything works fine. But If I want to open the table with
> 'dbOpenDynaset' or 'dbOpenSnapshot' the result is only the first record.
> And there is no error or warning message. I don't know what's the
> problem.

> Hope someone could help me.

> Thx in advance.

> CU

> Matthias

> --
> Matthias Waltsgott                                

> Fakultaet Wirtschaftswissenschaften        
> Studiengang Wirtschaftsinformatik  
> Technische Universitaet Ilmenau                    




Sun, 21 Nov 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Manipulating a secure Access2 db in VB4(16)

2. VB4 16Bit and Jet DB (Secured)

3. Can VB4-16bit work with Jet3.0 db?

4. VB4-16bit, dBase db, filtering deleted record

5. VB4 - 16BIT Sheridan Calendar Widgets (16bit OCX)

6. 16bit SourceSafe problems w/VB4.0-16bit - too many file handles open

7. VB3 16bit to VB4 16bit

8. VB4/Access2.0 to VB4/MSSQL

9. VB4-16bit or VB4-32 bit Floating Thin Toolbar

10. Upgrade Problems: VB4.0/16Bit to VB4.0/32Bit

11. VB4 16bit Vs. VB4 32bit???

12. VB3 - ADD TABLE TO ACCESS2-DB

 

 
Powered by phpBB® Forum Software