473,792 Members | 3,400 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
14 2286
Sky
<kd***@excite.c om> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
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


I believe the ODBC library does have functions to create DSNs at run time,
but I have never used them. I find it easer to simply write to the registry.
And if you use a static ODBC connection that does not change, then it is
easier to make the ODBC setup part of your install procedure, not part of
your program itself.

- Steve
Dec 20 '05 #11
Sky
<kd***@excite.c om> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.com...
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


My understanding was that this is an existing C++ program that calls the
standard ODBC library directly, not the ADO interface and not an Access
application with table links.

- Steve

Dec 20 '05 #12
In message <11************ **********@g14g 2000cwa.googleg roups.com>,
kd***@excite.co m writes
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.


I notice you got the problem fixed. Other people working with file DSNs
may like to know that the File DSN is a simple text file that can be
hand-edited if necessary. The only problem is that they appear to use
UNIX style line-end codes, so Notepad and other text editors can't edit
them. But Wordpad can edit UNIX text files and so can be used to edit a
File DSN.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author.

Dec 21 '05 #13
"Sky" <sk*@NOSPAMstan leyassociates.c om> wrote in
news:LK0qf.4249 7$eI5.3953@trnd dc05:
<kd***@excite. com> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.com...
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


My understanding was that this is an existing C++ program that
calls the standard ODBC library directly, not the ADO interface
and not an Access application with table links.


I don't know anything about C++, but many programming environments
have db libraries that would allow DSN-less connections. However,
the only ones I know about are much further from the metal than C++.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 21 '05 #14
kd***@excite.co m wrote in
news:11******** **************@ g44g2000cwa.goo glegroups.com:
But distributing and importing reg file with installation is
OK


Might not work on a machine with the registry permissions locked
down. You could probably avoid that by making sure the registry
entry you write is in the current user hive, and not in local
machine (which would be accessible only to users running with
administrative permissions, or with custom registry permissions that
allow users to write to it).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 21 '05 #15

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
1641
by: Biji | last post by:
Help to Covert MS Acess Data Base tO SQL Server Database
1
1433
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
9669
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
10207
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
10156
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
9997
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...
0
9030
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
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
5435
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
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2916
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.