473,585 Members | 2,552 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 8183
"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
14506
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...
1
3049
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...
5
40395
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...
6
7541
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...
7
2934
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...
5
7349
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
5652
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...
8
9619
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
6888
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...
0
7836
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...
0
8199
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. ...
0
8336
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...
1
7950
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...
0
6606
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1175
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...

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.