Solved

Working with Access instead of Sql Server

Posted on 2001-06-18
5
152 Views
Last Modified: 2013-11-20
Hi,

I have a problem.
I built an MFC application that connects to SQL Server 7.0 database via ODBC.
This MFC program uses the SQL language.

Now I want to change the database , and to work with Access.
So I created a new access database, and imported the information from the Sql Server database to the
new access DB.

I also changed the ODBC driver configuration to the access driver.

The problem is when I run my MFC program, an error accurs while I'm trying to open the DB tables.
The error discription is as following:
"Could not find file 'D:\MyDb\dbo.mdb'".

('D:\MyDb' is the path of the working directory).

I don't know what is that error means, what is the odb.mdb file ???

I will appreciate your help very much !!!!!




0
Comment
Question by:kukiya
5 Comments
 
LVL 4

Expert Comment

by:IainHere
ID: 6201776
I could be being stupid here, but I think that you've configured the ODBC driver info for the Access database to look at dbo.mdb, but that isn't the name of the actual database.  If this is the case, fixing it is simple - just correct the DSN (I assume this is what you mean by changing the driver configuration) to point at the database you created.

Hope this helps,
Iain
0
 
LVL 10

Expert Comment

by:makerp
ID: 6202183
use browse in the odbc configurartor to select the mdb file, this way the path and file will have to be right as you selected it
0
 
LVL 2

Accepted Solution

by:
agriggs earned 50 total points
ID: 6202597
Could be that a select statement in your code looks like select * from dbo.Table1.  The ODBC driver for SQL Server interprets this correctly as dbo being the owner of the table.  The ODBC driver for Access misinterprets the dbo as being the file name of a database.  Check the GetDefaultSQL method of each of your CRecordset objects.

0
 
LVL 1

Expert Comment

by:nivel
ID: 6203522
Why not use msde, it is free and it is 100% (i think) sql-server compatible. The only difference between msde and sql-server is speed. (Plus msde doesn't have any tools such as the enterprise manager.) But msde is still faster than access I think.
0
 
LVL 2

Expert Comment

by:MaheshSundararaman
ID: 6208891
All u need is Jet Database Engine that could connect ur Application to the MS-Access BackEnd.Install the latest
MS Data Access Components.Then in ODBC configure ur DSN with MS Access Driver.

ANd finally coming back u said C:\MyDB\dbo.mdb.

is dbo.mdb ur MS-Access File..if not i guess ts system defined databaseobject file..so u have to edit the settings and give the complete path name to the MDB file.

This should solve ur prob..

By the way u also need to Check the Recordset fields (like m_fieldname etc.avbl in one of ur headers
if its propoerly configured or what.

Else go for a separate MFC Wizard and just a simple program to establish connection with Acces Database using those wizards.Check the code there and compare it with ur original source code
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is it possible to combine several text files into one big one? (redhat v5 enterprise) 4 82
mixString challenge 36 112
sumHeights2  challenge 7 89
Path of Workbook 3 61
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now