Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

"unrecognized database format" 2007 fillschema

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tbuffaloe@amsservices.com - 18 Jul 2007 21:27 GMT
I have an Access 2003 format MDB with 530 of defined tables. The
tables have no data in them and on a machine that has office 2003 all
tables can be opened, and structure can be checked using Access 2003.

However, opening the same file (or a copy of the same file) on a
machine with office 2007 opens the MDB fine, but on some tables
results in Unrecognized database format error. Which happens to be the
last table definition that was added to the MDB.

If I use VS.NET to read the table structures the
OleDbDataAdapter.FillSchema will not return an error but does not
succeed in reading the same table that Access 2007 cannot reference.

FillSchema(oDS, SchemaType.Source, strTableName);

If Office 2007 is removed from the machine in question but Office 2003
remains the MDB behaves normally again.

Any ideas what is happening that affects the MDB, or how to avoid this
issue?

Sample code: that works on a machine with Office 2003 or earlier
versions.
        /// DataExportObj - Constructor.
        /// </summary>
        /// <param name="oDS"> Output dataset</param>
        /// <param name="strTableName"> Database table name</param>
        public DataExportObj(ref DataSet oDS, string strTableName)
        {
            //
            // Identify where the program was run from to find the export
reference database.
            //
            string codebasefile =
System.Reflection.Assembly.GetExecutingAssembly().Location;
            m_strExePath = Path.GetDirectoryName(codebasefile);
            m_strExePath = Path.Combine(m_strExePath, "CSVDef.mdb");

            m_connGeneric = new OleDbConnection();
            m_connGeneric.ConnectionString = "Jet OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Data
Source="
                + m_strExePath + ";Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk
Transactions=1;Provider=\"Microsoft.Jet.OLEDB.4.0\";Jet
OLEDB:SFP=False;Mode=Share Deny None;Jet OLEDB:Create System
Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet
OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet
OLEDB:Encrypt Database=False";
            m_connGeneric.Open();
            AddTable(ref oDS, strTableName);
        }

        /// <summary>
        /// AddTable - Add a table to the existing dataset.
        /// </summary>
        /// <param name="oDS"> Output dataset</param>
        /// <param name="strTableName"> Database table name</param>
        public void AddTable(ref DataSet oDS, string strTableName)
        {
            OleDbCommand selectCmd;
            selectCmd = new OleDbCommand("SELECT * FROM " + strTableName,
m_connGeneric);
            OleDbDataAdapter DAGeneric = new OleDbDataAdapter(selectCmd);
            DAGeneric.FillSchema(oDS, SchemaType.Source, strTableName);
            DAGeneric.Fill(oDS, strTableName); ///this is where the error
occurs with office 2007.
        }
Tony Toews [MVP] - 20 Jul 2007 00:45 GMT
>I have an Access 2003 format MDB with 530 of defined tables.

Jeff has already replied to your question in another posting of yours.

I suspect you've come across an internal limitation of Access.  And
like Jeff I would wonder if most/all of those should be combined into
a few tables.

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.