VB/MS Access Issue

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2006
Posts: 30
Reputation: Roobyroo is an unknown quantity at this point 
Solved Threads: 0
Roobyroo Roobyroo is offline Offline
Light Poster

VB/MS Access Issue

 
0
  #1
Nov 1st, 2006
I've got a VB app I wrote that runs over Access and works pretty well for the most part. However, there are a couple of pages where I get the following error when trying to access a database (no pun intended).

I'm getting the error "Unrecognized Database Format (path to .mdb file)". This seems to happen both if I'm trying to load a grid or a data control. The program keeps running after I hit "OK", but no data is loading into the objects (of course).

Any ideas?
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 2
Reputation: cdgaefke is an unknown quantity at this point 
Solved Threads: 0
cdgaefke cdgaefke is offline Offline
Newbie Poster

Re: VB/MS Access Issue

 
0
  #2
Nov 1st, 2006
Hi, from my experience, this usually happens when the Access database is corrupt, or in the process of going corrupt. Try using the Access repair utility and see if it corrects your error.

Charles

Originally Posted by Roobyroo View Post
I've got a VB app I wrote that runs over Access and works pretty well for the most part. However, there are a couple of pages where I get the following error when trying to access a database (no pun intended).

I'm getting the error "Unrecognized Database Format (path to .mdb file)". This seems to happen both if I'm trying to load a grid or a data control. The program keeps running after I hit "OK", but no data is loading into the objects (of course).

Any ideas?
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 30
Reputation: Roobyroo is an unknown quantity at this point 
Solved Threads: 0
Roobyroo Roobyroo is offline Offline
Light Poster

Re: VB/MS Access Issue

 
0
  #3
Nov 2nd, 2006
Originally Posted by cdgaefke View Post
Hi, from my experience, this usually happens when the Access database is corrupt, or in the process of going corrupt. Try using the Access repair utility and see if it corrects your error.

Charles

I'm going under Tools/Database Utilities/Compare and Compact Database, but it keeps giving me the change to open a database over and over, but never to repair it. I'm using Access 2003. What am I missing?
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 2
Reputation: cdgaefke is an unknown quantity at this point 
Solved Threads: 0
cdgaefke cdgaefke is offline Offline
Newbie Poster

Re: VB/MS Access Issue

 
0
  #4
Nov 2nd, 2006
In Access 97, the repair and compact methods are separate. In Access 2003, they appear to be the same. That goes along with everything I've seen ... the JetComp utility does it all in one, and the JRO method does as well.

I assume this didn't fix your problem?

If not, other things I'd check are:

- Try to have the version of the database match the version of Access, if possible. That is, if you have Access 2003, don't use it on an Access 97 or Access 2000 database.
- Check your connection method. How are you establishing the connection to the Access database? The most direct, efficient, and safe is with Jet 4. If you aren't sure, can you post the connection string used on the connection object? (Might be an ADO control or an actual ADODB.Connection object, or something else still.)

Originally Posted by Roobyroo View Post
I'm going under Tools/Database Utilities/Compare and Compact Database, but it keeps giving me the change to open a database over and over, but never to repair it. I'm using Access 2003. What am I missing?
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 2
Reputation: 1g0r is an unknown quantity at this point 
Solved Threads: 0
1g0r 1g0r is offline Offline
Newbie Poster

Re: VB/MS Access Issue

 
0
  #5
Nov 22nd, 2006
OK may I know how you create your database? Is it You just type outside your program(By means of opening Microsoft Access manually from outside of VB6)?
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 14
Reputation: udaywali is an unknown quantity at this point 
Solved Threads: 0
udaywali udaywali is offline Offline
Newbie Poster

Re: VB/MS Access Issue

 
0
  #6
Nov 26th, 2006
You are trying to connect a MSAccess database written in higher version than what the underlying data control is trying to access.

Select the data control and press F4 (properties). Look for Connect property. If is set to 'Access', make it 'Access 2000'. This works if your database is in MSOffice 2000. If your database is in MSOffice 95 or 97, 'Access' value is correct.

Check project references (Project > References menu in VB IDE).
Use the latest DAO version 3.6 (or higher).

This should fix your problem.

If not, repair the database and try to open in MSAccess itself.

If you can not, the database is irrepairable.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 30
Reputation: Roobyroo is an unknown quantity at this point 
Solved Threads: 0
Roobyroo Roobyroo is offline Offline
Light Poster

Re: VB/MS Access Issue

 
0
  #7
Nov 27th, 2006
Originally Posted by 1g0r View Post
OK may I know how you create your database? Is it You just type outside your program(By means of opening Microsoft Access manually from outside of VB6)?




I created all the tables in the database four or five years ago in Access 97.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: VB/MS Access Issue

 
0
  #8
Nov 27th, 2006
Hi,

Access 2000 And Greater Versions Cannot be bound to DataControl Control In VB6. For that u will have To Use ADODC Control.

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 14
Reputation: udaywali is an unknown quantity at this point 
Solved Threads: 0
udaywali udaywali is offline Offline
Newbie Poster

Re: VB/MS Access Issue

 
0
  #9
Nov 28th, 2006
Connect property of data control can be set to 'Access 2000' instead of older 'Access'. Just this simple change will work.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 30
Reputation: Roobyroo is an unknown quantity at this point 
Solved Threads: 0
Roobyroo Roobyroo is offline Offline
Light Poster

Re: VB/MS Access Issue

 
0
  #10
Jan 13th, 2007
Originally Posted by udaywali View Post
Connect property of data control can be set to 'Access 2000' instead of older 'Access'. Just this simple change will work.

I did this and it solved the initial problem. However, now I'm getting the error message:

Couldn't find installable ISAM

Do you know what that's about?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC