kukiya
asked on
Working with Access instead of Sql Server
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 !!!!!
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 !!!!!
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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
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
Hope this helps,
Iain