VB 4.0 Database Access via ODBC 
Author Message
 VB 4.0 Database Access via ODBC

In testing why an application was running so slow through a dial-up
Point-To-Point networking configuration, I analyzed what our Visual Basic
and Power Builder apps were doing in their start up routines.

I turned on the ODBC tracing (through odbcad32.exe Options) and was
surprised that the Power Builder apps call the ODBC considerably
differently than our apps written in VB.

Since Power Builder can use embedded SQL and supports bound variables in
its SQL, it will submit a Query, bind the return columns and will be able
to access the data after each fetch.

Our VB code on the other hand submits the query, does as many DescribeCol
calls as the number of columns in the result set and then does a GetData
call for each column after every single fetch.  Since one of the tables,
has 68 columns and there were hundreds of thousands of rows, you can
imagine the inefficiency of the extra ODBC calls going on behind the
scenes.

MY QUESTION IS, IS THERE ANY BETTER WAY TO ACCESS DATA IF YOU ARE GOING TO
RETURN THOUSANDS OF ROWS FROM THE SAME TABLE.

COMMENTS WOULD BE GREATLY APPRECIATED.

P.S. I do not know if this is addressed in VB 5.0 with direct support for
bound variables.




Sat, 18 Sep 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB 4.0, Crystal Reports and Access via ODBC

2. VB 4.0, Crystal Reports and Access via ODBC

3. VB 4.0, Crystal Reports and Access via ODBC

4. Connecting to an Access 95 database via an ODBC driver in VB 5.0

5. Connecting to an Access 95 database via an ODBC driver in VB 5.0

6. How I update ORACLE 7.2 database from Visual Basic 4.0 via ODBC

7. Hilfe: VB 4.0 Zugriff auf Informix Online 6.0 via ODBC

8. VB 4.0 database access quits after installing NT 4.0 Server

9. How to access a sybase-database via ODBC

10. VB5 access to Lotus Notes database via ODBC

11. Using Access-database via ODBC

12. Crystal Reports - Access Database via ODBC - Patternmatching

 

 
Powered by phpBB® Forum Software