473,700 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

connection via odbc takes very long time

HI,

I use vb6 to access database. I can select between "local" data base
and "remote" data base. Both connection calls the same Access 2000
Mdb.
The Mdb contains local tables (on the hard disk) and remote links to
Oracle tables via odbc link.

The local connection (to the recordset) is fast, but the "remote"
connection takes around 7 minuits.

NOTE: Connecting to the "remote" tables, manually via Access2000, is
fast!!

I'm desperate to find a solution to that problem. Any idia will be
appriciated.

Rafi

The program:

'-------Connection---------
Set dbsConn = New ADODB.Connectio n
dbsConn.CursorL ocation = adUseClient
dbsConn.Connect ionString =
"Provider=Micro soft.Jet.OLEDB. 4.0;PersisSecur ity
Info=False;Data Source= " & MdbPath
'MdbPath=locati on of Access 2000 DB
dbsConn.Open

'---------Record Set -----------------
Set dbsRSCard = New ADODB.Recordset
DoEvents
Set dbsRSTest = New ADODB.Recordset
DoEvents
dbsRSCard.Open tblCard, dbsConn, adOpenDynamic, adLockOptimisti c
'rafi
DoEvents
dbsRSTest.Open tblTest, dbsConn, adOpenDynamic, adLockOptimisti c
'rafi
'Local - tblCard, tblTest are local Access tables
'Remote - tblCard, tblTest are remote links to Oracle tables via
odbc
Nov 12 '05 #1
6 8186
"Rafi Kfir" <ra*******@telr ad.co.il> wrote in message
news:f7******** *************** ***@posting.goo gle.com...
HI,

I use vb6 to access database. I can select between "local" data base
and "remote" data base. Both connection calls the same Access 2000
Mdb.
The Mdb contains local tables (on the hard disk) and remote links to
Oracle tables via odbc link.

The local connection (to the recordset) is fast, but the "remote"
connection takes around 7 minuits.

NOTE: Connecting to the "remote" tables, manually via Access2000, is
fast!!

I'm desperate to find a solution to that problem. Any idia will be
appriciated.


What I suspect is that when you see fast connections to the remote tables in
Access you are opening a datasheet and seeing "some data" quickly. Access will
display the datasheet after a few pages of data are pulled across. It might
very well take several minutes to pull *all* of the data in Access and your VB6
app might being doing just that. What exactly is your process when you say
you're "connecting "?
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 12 '05 #2
Hi Rick

Thank you for taking the time to deal with my problem.

I measure the time it take Access to read the tables: The first one
takes 10 sec and the second one 50 sec. Via VB it takes around 7
minuits....

When I say connecting I mean that I double click the link to the
remote table which connect me to the remote table.

Any more good ideas?

Thanks,
Rafi
Nov 12 '05 #3
"Rafi Kfir" <ra*******@telr ad.co.il> wrote in message
news:f7******** *************** ***@posting.goo gle.com...
Hi Rick

Thank you for taking the time to deal with my problem.

I measure the time it take Access to read the tables: The first one
takes 10 sec and the second one 50 sec.


I'm still not sure what that means. What process are you running on the tables
in Access? Are you runnning a process that requires the entire table be read
such as opening a RecordSet and then doing a MoveLast?
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #4
Hi Rick and Thanks again,

The processes that takes the time are line 1 and 2 below.

The time also depends on the PC. I have the same program run on two
different PCs and one does it in 4 minuites while the other in 7.5
minuits. The same PC will reach the data from Access2000 much much
faster.

I do use 'MoveLast' but at that time it doesn't take any time at
all...

The number of records is 20,000 in one table and 140,000 in the other.

Any more ideas?

Thanks
Rafi
The program:

'-------Connection---------
Set dbsConn = New ADODB.Connectio n
dbsConn.CursorL ocation = adUseClient
dbsConn.Connect ionString =
"Provider=Micro soft.Jet.OLEDB. 4.0;PersisSecur ity
Info=False;Data Source= " & MdbPath
'MdbPath=locati on of Access 2000 DB
dbsConn.Open

'---------Record Set -----------------
Set dbsRSCard = New ADODB.Recordset
DoEvents
Set dbsRSTest = New ADODB.Recordset
DoEvents
1) dbsRSCard.Open tblCard, dbsConn, adOpenDynamic, adLockOptimisti c
DoEvents
2) dbsRSTest.Open tblTest, dbsConn, adOpenDynamic, adLockOptimisti c
'Local - tblCard, tblTest are local Access tables
'Remote - tblCard, tblTest are remote links to Oracle tables via
odbc
Nov 12 '05 #5
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It would probably be a better idea to create a connection to the
Oracle dbs directly instead of going thru the Jet engine. You can use
the OLEDB provider for Oracle (MSDAORA) or a DSN-less connection
"Driver=Microso ft ODBC for Oracle";Server= <etc.>."

MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP7ldgIechKq OuFEgEQKtzACgmZ q7rWyRUx9nBPMVj PlP2yMtux0AoKXY
LF32ctu35RirEYV CEwCyG15v
=Pdf5
-----END PGP SIGNATURE-----
Rafi Kfir wrote:
Hi Rick and Thanks again,

The processes that takes the time are line 1 and 2 below.

The time also depends on the PC. I have the same program run on two
different PCs and one does it in 4 minuites while the other in 7.5
minuits. The same PC will reach the data from Access2000 much much
faster.

I do use 'MoveLast' but at that time it doesn't take any time at
all...

The number of records is 20,000 in one table and 140,000 in the other.

Any more ideas?

Thanks
Rafi
The program:

'-------Connection---------
Set dbsConn = New ADODB.Connectio n
dbsConn.CursorL ocation = adUseClient
dbsConn.Connect ionString =
"Provider=Micro soft.Jet.OLEDB. 4.0;PersisSecur ity
Info=False;Data Source= " & MdbPath
'MdbPath=locati on of Access 2000 DB
dbsConn.Open

'---------Record Set -----------------
Set dbsRSCard = New ADODB.Recordset
DoEvents
Set dbsRSTest = New ADODB.Recordset
DoEvents
1) dbsRSCard.Open tblCard, dbsConn, adOpenDynamic, adLockOptimisti c
DoEvents
2) dbsRSTest.Open tblTest, dbsConn, adOpenDynamic, adLockOptimisti c
'Local - tblCard, tblTest are local Access tables
'Remote - tblCard, tblTest are remote links to Oracle tables via
odbc

Nov 12 '05 #6
Thank You,

This was the conclusion I came by this morning after discussing this
issue with a workmate. We made some test and indeed the direct
connection is immidiate.

While working with the Jet I needed to Open a Record Set which took a
long period of time, and then do my job of adding more records. With
a connection directly to the Oracle DB I use a SQL command to
immidiately add the new record.

Thanks for your advice
Rafi

It would probably be a better idea to create a connection to the
Oracle dbs directly instead of going thru the Jet engine. You can use
the OLEDB provider for Oracle (MSDAORA) or a DSN-less connection
"Driver=Microso ft ODBC for Oracle";Server= <etc.>."

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
14521
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there for slowness. Once I'm connected the queries work pretty much instantanously but to connect using SQLPLUS, Toad, ODBC, OLEDB all take about 10 secs. I connect using OLEDB from Visual Basic development environment & after the 1st connection...
1
3054
by: James Brown | last post by:
This problem has had me stuck for weeks now... I have an ASP .NET application on a machine running Windows 2000 Server. It connects to an ODBC data source using the ODBC Data Provider. The connection takes about 5 seconds to create. It takes 5 seconds whether I load the application locally on the server's browser, or across the network from a client PC. A Windows Forms application on the same server, creates the same
5
40404
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network lacation on a different machine, it tells me that the ODBC connection to 'SQL Server Name' failed. How can I create the linked table permenant no matter what machine the networked database is opened on?
6
7543
by: Mojtaba Faridzad | last post by:
Hi, I am newbie in C# and I am trying to design my first database program and I am trying to find the best solution. The database is MySQL. how do you open your connection in a big application? as I know, I should open a connection, set the dataset and close the connection. I should open the connection in "try" block and close the connection in "finally" block. is that right? I can write a service to pass the query and retreive the...
7
2937
by: mfeingold | last post by:
I am working on a system, which among other things includes a server and a ..net control sitting in an html page and connected to the server. I ran into a couple of problems, you guys might have some insight about. 1) It takes 20 sec or so to open a tcp socket from the client to the server. It just sits in the TcpClient.conect waiting for something. When I run the same control from a windows application it connects right away and works...
5
7354
by: Zlatko Matiæ | last post by:
Hello. In ODBC Data Source Administrator, there is a tab "Connection Pooling" and option "PerfMon" Enable/Disable. Could someone explain the meaning of the option and how it reflects to Access when having ODBC linked tables, JET queries on linked tables and pass-through queries? Thanks,
4
5655
by: Julia | last post by:
Hello everyone, I have an Access 2003 (2000 format) front end application with SQL 2000 back end that is being used by about 20 users on a daily basis (using local copy of .mdb file). Ever since we migrated the data to the company's SQL server we've been having problems with one particular table (tblContact). We were using linked tables and ODBC connection originally. When we tried to make any changes (additions/edits/deletes using SQL...
8
9632
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query work from
0
6898
bartonc
by: bartonc | last post by:
This is a work in progress (current and active). There are some issues to resolve in supporting multiple connection types and I plan to add PySQLite to the mix. The this update is due to my suggesting the accompanying helper functions in a recent post and noticing that the ones posted here are a bit out of date. I'll post those helpers in a separate thread. I've also been working with the following database engines: MySQL 5.x SQLite3 JET...
0
8725
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8644
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9074
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8924
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2027
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.