473,782 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems with DSN for MS Acess database

Hi!
I'm looking for some help in fixing my screwup:

I've got C++ app which reads MDB database, using MFC CDatabase and
CRecordset derived classes. I had it working OK on development PC (Win
XP SP2) with MS Access 2000 installed (the app itself does not use MS
Access). I moved the app on another PC (also Win XP SP2) without MS
Access. After some poking around I've figured out that the app does not
work because DSN it is using was not available. So I created System DSN
for MS Access Database by hand and my app was working OK.

After that by silly mistake User DSN for MS Access Database was created
on the development PC (the one with existing and working MS Access).
This upset performance of database access very badly - it takes very
long time to read and move through the records.
I've (1) unrolled XP to earlier date, (2) reinstalled MS Access - still
have the problem.

MS Access itself seems to be OK, no noticeable degradation of speed,
but CDatabase.Open and ExecuteSQL, CRecordset::Mov eFirst MoveNext, etc
take very long time. It also looks like increased disk activity during
those operations.

So, any hints on what's going on and how stop it from going on like
that?

Many thanks
kdv09

Dec 20 '05 #1
14 2285
Sky
<kd***@excite.c om> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
....
After that by silly mistake User DSN for MS Access Database was created
on the development PC (the one with existing and working MS Access).
This upset performance of database access very badly - it takes very
long time to read and move through the records


You could check the Advanced parameters in the ODBC setup.

Or you could extract the registry entries and compare them between the two
computers. To do this, open RegEdit and look at the keys for:

[HKEY_CURRENT_US ER\SOFTWARE\ODB C\ODBC.INI\Your OdbcDsN]

if it is a User DSN,

or

[HKEY_LOCAL_MACH INE\SOFTWARE\OD BC\ODBC.INI\You rOdbcDsN]

if it is a System DSN.

You can use RegEdit File Export to save text files for these keys and
compare the results.

If you have both User and System DSN, the User DSN wins, when you connect in
C++ using ODBC.

One parameter to check is buffer size, located at:

[HKEY_CURRENT_US ER\SOFTWARE\ODB C\ODBC.INI\Your OdbcDsN\Engines \Jet]
"MaxBufferSize" =dword:00008000 ; or whatever size you want

- Steve
Dec 20 '05 #2
On 19 Dec 2005 21:02:12 -0800, kd***@excite.co m wrote:
Hi!
I'm looking for some help in fixing my screwup:

I've got C++ app which reads MDB database, using MFC CDatabase and
CRecordset derived classes. I had it working OK on development PC (Win
XP SP2) with MS Access 2000 installed (the app itself does not use MS
Access). I moved the app on another PC (also Win XP SP2) without MS
Access. After some poking around I've figured out that the app does not
work because DSN it is using was not available. So I created System DSN
for MS Access Database by hand and my app was working OK.

After that by silly mistake User DSN for MS Access Database was created
on the development PC (the one with existing and working MS Access).
This upset performance of database access very badly - it takes very
long time to read and move through the records.
I've (1) unrolled XP to earlier date, (2) reinstalled MS Access - still
have the problem.

MS Access itself seems to be OK, no noticeable degradation of speed,
but CDatabase.Open and ExecuteSQL, CRecordset::Mov eFirst MoveNext, etc
take very long time. It also looks like increased disk activity during
those operations.

So, any hints on what's going on and how stop it from going on like
that?

Many thanks
kdv09


Did you accidentally turn SQL logging on for the DSN?
Dec 20 '05 #3
Sheesh, this could be it! As a matter of fact I do have it on at the
moment - trying to figure out what's wrong. I'll check this first thing
tomorrow when I get back to the PC in question!
Logging would slow down all DB operations for sure, so this is a very
good guess!!!
Many thanks
kdv09
Steve Jorgensen wrote:
On 19 Dec 2005 21:02:12 -0800, kd***@excite.co m wrote:
Hi!
I'm looking for some help in fixing my screwup:

I've got C++ app which reads MDB database, using MFC CDatabase and
CRecordset derived classes. I had it working OK on development PC (Win
XP SP2) with MS Access 2000 installed (the app itself does not use MS
Access). I moved the app on another PC (also Win XP SP2) without MS
Access. After some poking around I've figured out that the app does not
work because DSN it is using was not available. So I created System DSN
for MS Access Database by hand and my app was working OK.

After that by silly mistake User DSN for MS Access Database was created
on the development PC (the one with existing and working MS Access).
This upset performance of database access very badly - it takes very
long time to read and move through the records.
I've (1) unrolled XP to earlier date, (2) reinstalled MS Access - still
have the problem.

MS Access itself seems to be OK, no noticeable degradation of speed,
but CDatabase.Open and ExecuteSQL, CRecordset::Mov eFirst MoveNext, etc
take very long time. It also looks like increased disk activity during
those operations.

So, any hints on what's going on and how stop it from going on like
that?

Many thanks
kdv09


Did you accidentally turn SQL logging on for the DSN?


Dec 20 '05 #4
Thanks, Steve - i'll verify this as soon as I'm back to work tomorrow!
BTW, Is there any way to check and create DSNs programmaticall y (I had
a cursory look only and could not find anything yet)?
regards
kdv09

Dec 20 '05 #5
kd***@excite.co m wrote in
news:11******** **************@ g49g2000cwa.goo glegroups.com:
i'll verify this as soon as I'm back to work tomorrow!
BTW, Is there any way to check and create DSNs programmaticall y (I
had a cursory look only and could not find anything yet)?


Can't you do DSN-less connections? Google the term.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 20 '05 #6
Sky
<kd***@excite.c om> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
Thanks, Steve - i'll verify this as soon as I'm back to work tomorrow!
BTW, Is there any way to check and create DSNs programmaticall y (I had
a cursory look only and could not find anything yet)?
regards
kdv09


You can directly write the ODBC registry entries using standard Windows API
from C++. Or you can write to the registry in your installer program (I
recommend InnoSetup).

Or, you can use RegEdit File Export to create a .reg file, fix it up the way
you want it in Notepad, and then in your C++ program Shell out to add the
..reg file. The Shell command would be something like:
RegEdit /S MyOdbcSetupl.Re g

- Steve

Dec 20 '05 #7
Yep, the problem was in activating logging, rather than in DSN itself!
many thanks for your help
kdv09

kd***@excite.co m wrote:
Sheesh, this could be it! As a matter of fact I do have it on at the
moment - trying to figure out what's wrong. I'll check this first thing
tomorrow when I get back to the PC in question!
Logging would slow down all DB operations for sure, so this is a very
good guess!!!
Many thanks
kdv09
Steve Jorgensen wrote:
On 19 Dec 2005 21:02:12 -0800, kd***@excite.co m wrote:
Hi!
I'm looking for some help in fixing my screwup:

I've got C++ app which reads MDB database, using MFC CDatabase and
CRecordset derived classes. I had it working OK on development PC (Win
XP SP2) with MS Access 2000 installed (the app itself does not use MS
Access). I moved the app on another PC (also Win XP SP2) without MS
Access. After some poking around I've figured out that the app does not
work because DSN it is using was not available. So I created System DSN
for MS Access Database by hand and my app was working OK.

After that by silly mistake User DSN for MS Access Database was created
on the development PC (the one with existing and working MS Access).
This upset performance of database access very badly - it takes very
long time to read and move through the records.
I've (1) unrolled XP to earlier date, (2) reinstalled MS Access - still
have the problem.

MS Access itself seems to be OK, no noticeable degradation of speed,
but CDatabase.Open and ExecuteSQL, CRecordset::Mov eFirst MoveNext, etc
take very long time. It also looks like increased disk activity during
those operations.

So, any hints on what's going on and how stop it from going on like
that?

Many thanks
kdv09


Did you accidentally turn SQL logging on for the DSN?


Dec 20 '05 #8
Cool! I was just thinking there might be some API like CreateDSN or
something. But distributing and importing reg file with installation is
OK
Thank you for your help
kdv09

Dec 20 '05 #9
David,
thanks for the suggestions! As a matter of fact, I had no particular
preference, just used some code from example i saw somewhere and it
worked. But now, after you've mentioned the issue I can see that using
DSN might be somewhat limiting in my application and DSN-less
connection could be a bettter choice - I will investigate and try to
use DSN less connection
Many thanks
kdv09

Dec 20 '05 #10

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

Similar topics

1
2566
by: Randall Perry | last post by:
I've got an app written with Access XP that was deployed 2 years ago using a PostgreSQL backend database through an internet connection. Recently a client upgraded to XP Service Pack 2. After the upgrade she was unable to connect to the remote database, getting the error: Unable to connect to remote database File Name=C:\Program Files\Common Files\ODBC\Data Sources\PostgresCNI.dsn Error message: The file is not a valid compound file.
2
1317
by: Rodrigo Ferreira | last post by:
How can i interligate my app with a DB in MS Acess? I don't know how to do that! Greetings.
0
1250
by: minhadd | last post by:
Hello Would Anyone help me ?? I want insert into Microsoft Acess visitor's IP by ASP. But It is not working ---------------------------------------------------------------------------------------------------------- NOT WORK
5
1742
by: Islamegy® | last post by:
In my project i have two master page which i change dynamic in runtime.. The first one with 1 ContentPanel "onepanel.master", the second with 2 contentPanel"twopanel.master".. but when i switch between them it don't work, if the default masterpage is "onepanel.master" and try to change it in runtime, ContentPanel2 which is exist in the loaded masterpage throw exception.. the same happen if the default is "twopanel.master" and switch it...
0
1515
by: Pk | last post by:
Hi, I want to download and upload the data from acess database into excel file or from excel to database. So how can i use "Excel.Application" to do this type of job. So please help me soon. Thanks Pk
2
1512
by: sonasiva | last post by:
hai Iam creating my own website using ASP and MS ACESS ,iam new to ASP and SQL Please help me to write a query to finish my project. i have datas as follows in my database sno name companyname shares percentage date 1 aaa kroft 5000 5 1/1/2007 2 aaa kroft 10000 10 1/9/2007 if i click "name" link the deatils should...
1
1639
by: Biji | last post by:
Help to Covert MS Acess Data Base tO SQL Server Database
1
1432
by: =?Utf-8?B?Sm9obiBDbGVubmV0dA==?= | last post by:
We are experiencing timeout problems with 2 of the reports on our website at present. Basically what is happening is , we have a request to the SQL Server database to run a stored procedure to return the data. Some of the requests are quite complecated & we expect them to take some time so we have increased our database & web timeouts to 600 secs in the web.config <httpRuntime executionTimeout="600" /> We have run the stored procedures...
2
3816
by: Jason7899 | last post by:
hi, there is any way to recover deleted records from a acess database? thanks a lot for your help )
0
10313
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
10146
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...
0
9944
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
7494
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
5378
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
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.