Home » MS Office

Looking to convert Access 1.0 MDB databases to later version


We have several Access 1.0 MDB database files that were created using Microsoft VB 3.0 programs.

Is there an easy way to convert these database to the latest version of SQL?  We would like to use the converted files in at least a VGB 6.0 program and possibly in .NET VB programs.

We use a program called DATAMGR.EXE to open and maintain these MDB files.

Any help would be gratefully appreciated.



15 Answers Found


Answer 1

If by access  1.0 MDB database  you mean a database that was created  with the original version  of Access released in 1992, pardon me, 18 years ago. You are mostly likely outside the window of the most recent versions of Access being able to open  older versions. MS maintains a certain level of backward compatibility but isn't going to support a file format that was created 18 years, pardon me, 2 decades ago.

Unless there's an app out there that can do the trick (which while possible isn't likely given the limited market), you'll most likely have to recreate the tables manually if you're able to view them in Design mode at all. Toss in there that the earlier versions of Access namely 1.0 and 2.0 had very limited export functionality and nothing when it comes to VBA. If you want access to the data, you may have to rekey all of it. The headaches that you will most likely face in upsizing is the actual business case for organizations to remain somewhat current as later versions of an application are released.

You're best bet is to start from scratch.

Would you continue to use a computer with a Intel 286 processor running at 25 MHz in today's world of high-speed internet?


Answer 2

Hello David.

Thanks for your reply.



Answer 3

Keep in mind that accesss 97 to 2002 can import from an access  2.0.


Access 2003 can import 2.0 if you download + install converter.


So, are you sure this is a 1.0 access file?


Access 2.0 was out in 1994, and access 1.0 in 1992.


Also, try excel, it always amazed me at how it could import old dbase and all kinds of older formats that I can't even remember that existed.


You could certainly try access 97 or even access 2002 to see if the data can be imported.


Albert D. Kallal  (Access MVP)

Edmonton, Alberta Canada




Answer 4

If it's a matter of importing the data (rather than recreating the functionality of the application), it's doable. I actually still have a (legal!) copy of Access 2.0, and I've used it to "bootstrap" from 1.0 to 2.0 to 97 to pretty much whatever.

So... do you want to convert  the program - the user interface? If so, I agree with the others who say you're much better off to start from scratch; there are much better and easier to use tools available now. Or do you just want to salvage the data?

Answer 5

OFF TOPIC: I miss the 2.0 icons.

Answer 6

David, some of your statements are incorrect. The OP does NOT have to rekey the data. There is an upgrade path from 1.0 to 2.0 to 2002 to 2010. Not pretty, but not rekeying either. If the OP contacts a long-term Microsoft Solution Provider like the company I work for, they may still have all these versions in their MSDN CDs and can upgrade the data.

The UI and business logic would have to be rewritten.

-Tom. Microsoft Access MVP

Answer 7

You might want to try useing OpenOffice Base.  It should be able to import the database  and then maybe save it as an MSOffice 2000 file.

Take a look at http://searchenterpriselinux.techtarget.com/tip/OpenOffice-Base-Converting-data-and-files-from-Access

Best of luck,



Answer 8

That will not help, the issue + problem here is that any product (vb.net, VB6, FoxPro, FileMaker, c++, c# and Base as you mention) ALL USE the default set of ODBC drivers and version  of JET that has shipped with windows for 10+ years for importing.

In point for 10+ years you NEVER needed to install access  on a computer to import and pull data out of access database  files. You can even use windows scriting without anything else having been installed to pull data out and read those access data files. Again, you could always do this without having access installed.


Bottom line:


Without something that supports this 1.0 format, you not going to use a later version of access (or the odbc "jet" drivers that all products rely on in windows). In other words, what your suggesting will not help  since it relies on those later drivers.


So, the issue here is just that 1.0 is so very old. As a few mentioned here, you have to go from 1.0 to 2.0. At that point, then access 97 to 2002 (by default) can import.

For 2003-2007, installing 2.0 file support as a download will extend this to access 2003 and 2007. I am not sure if there is a add-in for access 2010 right now, but considering that 2.0 is 1994 format, I can't say this is real issue.


The bottom line here is get the data into 2.0 (1994) format, and then you quite easy  be able to find someone with most recent editions of office to import the data to a later format.

And, perhaps this is not a 1.0 format, and is in fact 2.0. Testing a import with access 97 to 2002 would verify this quite easy.


Albert D. Kallal  (Access MVP)

Edmonton, Alberta Canada


Answer 9

If you check, you'll see that I stated 'may'. I did given that I'm well aware that while the probability of a solution being out there is slim, its not outside of the realm of possibility. Case in point, the possibility that Excel could pull the data out. Granted, I hadn't considered the possibility that some firms out there might still have their 2.0 disks laying around.

Answer 10

I want to thank everybody for their ideas and suggestions.

I'm pretty sure these MDB files  are 1.0/1.1 files.  I don't think they were created  using Access.  They were created using a VB 3.0 program.

How do i tell for sure?  Test an import using access  2002?  I can open  and access these files using ADO in VB 6.0.  Is there some method or property I can use to determine the format?

We are only interested in converting the database  to a later version  so that we can use it with more recent programming technology.

I am in the process of analyzing the suggestions i received and trying to install the software needed to attempt a conversion.



Answer 11

That sounds like very encouraging news indeed. In fact if you can open  this with ado and a standard jet connection OLDB 4.0 string, then this suggests that you at least at 2.0 format or even perhaps later.


So yes, just fire up a recent edition of access. Create a new blank database.


Then go file->get external data, and import.  You can import all of the data and tables in "one step" and the result will be a database  in the current format. Note that table relationships , etc. will remain intact when you do it this way.


Judging by what you said and if you can use an ado connection string, then it's in a later format anyway.


In fact if you have any version  of access  running on your machine now, I would try opening the file directly and see what kind of message you get.  (always work on a copy if you going to DIRECT open the file with access since access will ask of you want to convert  to a later format. Often don't want to do this on your only copy of a file and when you are in a hurry you can often ignore or mess those prompts.


It is best to do the file->external data. But, it access converts it direct, that is ok.


You don't mention what kind of ado string you're using with VB6, but if you are using a JET OLDB 4.0,  then JET data engine jet is opening this file. Remember, your ADO does in fact use the JET engine here. And, point here is that Access also uses that SAME JET engine.


In fact you have access on a machine, I would try opening a copy of a file and see what happens.

As for an easy  way to determine exactly what format it is, I don't have a good answer for you. However if you do the file get external data tip above, you will be using a later edition of the JET file format. This would allow you to use the tools in access to migrate the data and upsize it to SQL server if you so desire.

Albert D. Kallal  (Access MVP)

Edmonton, Alberta Canada


Answer 12

Hello Albert.

Thanks for your help.

I only have access  2007.  I tried using that, but i could not find external data/import, so I just tried opening it.  It gave me a warning "This database  was created  using a previous version  of Microsoft Office Access."  If i click YES to  convert  it, it gives the message "This operation is not supported for Microsoft Office Access 1.x databases."

So, it seems like it knows that the mdb  file is version 1.0/1.1.

I also managed to read through the MDB file using ADO.NET in VS 2008 VB.  The code is used is here:

Dim coyneEDMSCtlConn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Dataflow\DB\edmsctl.mdb")
  Dim coyneEDMSCtlCommand As OleDbCommand = coyneEDMSCtlConn.CreateCommand()
  coyneEDMSCtlCommand.CommandText = "SELECT * FROM Control"


  Dim coyneEDMSCtlReader As OleDbDataReader = coyneEDMSCtlCommand.ExecuteReader()

  If coyneEDMSCtlReader.HasRows ThenDim XXX AsStringDim bbb AsBooleanDoWhile coyneEDMSCtlReader.Read()
    Console.WriteLine(vbTab & "{0}", coyneEDMSCtlReader.GetBoolean(1).ToString)
    bbb = coyneEDMSCtlReader.GetBoolean(1)
    XXX = coyneEDMSCtlReader.GetName(1).ToString


I think i will try to convert the files  using a VB program.  Does that make sense?

Thanks for all of your help.


Stop The World, I want To Get Off!

Answer 13

Your idea of using a VB program  is possible, but it certainly doesn't make sense if a simple import option would will work for you. So you should try the external data suggestion because it only takes a few seconds of your time and the upside of that benefit would be that you don't need any code to be written at all.


So just create a blank database  in access  2007, then try import.


The external data tab can be found here:



Keep in mind that the external data tab is ONLY available and active when you have an existing database currently opened (of which you plan to import data into). So, you must create a blank database before you attempt a import.


So click on the access icon in the import and you get a option to link, and an option to import (you should/will eventually try BOTH options if one of the other doesn't work). You first choice to try is import. I'm not 100% sure that importing will give you better luck than attempting to convert, but usually it's a little bit more flexible and gives you a little bit more leeway in terms of the file formats. It worth a try for the time it takes.


When the wizard launches or importing data, choose the option to import data, and then simply browse to data file. If that works you are home free and all of your data can be pulled into a newer format.


If importing does not work, then I would attempt to see if linking works, and if that works then once again you might have to write a little bit code and use a few append queries, but again it's gonna be far less work than writing your own import routines from scratch.


And in fact if linking to these tables does not work (if after importing don't work), I would hunt around and find an older version  of office like access 97 and simply import this. I just don't think it's a great idea to resort to writing a whole bunch of code until the other "easy" possibilities are first exhausted.  If you don't have any of these other choices, then certainly coding is another choice in your list of possible approaches here.


Albert D. Kallal  (Access MVP)

Edmonton, Alberta Canada


Answer 14

Wow!!! That was easy.  It took exactly three seconds to import the whole database  with 22,000 history records.

It looks like i will not need to write a program  to do this.  Thanks for pointing that out for me.

Should i leave the imported Access Database(.accdb) as is, or can i export it to an SQL database file.

Do you still feel the original file i have is not from Access 1.0/1.1?

Thanks again for all of your help.



Answer 15

Should i leave the imported access  Database(.accdb) as is, or can i export it to an SQL database  file.

You can well leave it in current format. Access can connect to a lot of different systems and you can even send the data up to SharePoint if you want. So, you have the data in a great veggie matic data slicing system now.


If you have sql  server sitting around handy, then you can use the built-in UPSIZING tools in access and it will just send the data right up to sql server. Do test this on a copy if you new to using this feature.


Note that you can upsize just the one table at a time, or send the whole set of tables up to sql server. Just click on the database tools tab on the ribbon and you will see a SQL server button in the "move data" group on the ribbon. That option can be used to send data up to sql server.  

Do you still feel the original file i have is not from Access 1.0/1.1? 

Hum, I think so. You did get an error message suggesting as such (so, it 1 or 2). However, I did not think that access 2007 without anything was going to be able to convert  a 1.0 (so, I can't be 100% sure). However, I am quite impressed that it still does import a data file from 1992 (and I did not think even importing would work on 1.0 files, so that why I think this is 2.0)


In fact, often people don't care about a conversion, but a import as you done is fine for getting the data out. So, in a sense if someone asked can you convert, we might have said "no, you can not", however, at the end of the day, sometimes small semantics on what is being asked can make a huge difference. It not every day we get a question like this here, so I am quite impressed.


Anyway, your much on you way regardless where that data eventually goes.


Albert D. Kallal  (Access MVP)

Edmonton, Alberta Canada





I want  to convert 2003 Access DB(.Mdb)file to 2007 Access (.accdb) using microsoft.office.interop.access using C#

please provide solution for that?

i would appreciate if you can provide answer as soon as possible

Thank you



I have a catalog program that spits out an ASP.net VB website that does everything i need except alow users to upload items to the database. I love VWD and would like to use it to modify my exsiting site and allow users to upload items to the database. The trick is that the database is Access (.mdb file) and the project wasnt made in VWD. Any help on bring the project into VWD or making a Dynamic Data site that can add to tables in the access dataBase would be much help to me.


I want to upgrade the 32bit application to 64 bit application.
In my 32 bit application i use Microsoft Access as the backend database ( simple only with some few tables, no relations)

I have used MFC database classes like CDaoDatabase, CDaoRecordset for accessing the database.
During the upgrading process i came to found that CDaoDatabase classes are now no longer supported in Win64 platforms.
I get the following error:
 fatal error C1189: #error :  DAO Database classes are not supported for Win64 platforms

Also going through some of msdn Q/A articles, i found that CDaoDatabase classes have been deprecated now, or sth like there is no provision for accessing the .mdb in X64 platform.

Is there really no method for accessing the Access database in X64 platform.
Are there any other solutions.....
Is switching to ADO.Net will be the solution....

Hope Somebody will put the light on this topic..

Anur RS..

My problem does not seem to be the same as in other links.  I'm trying to teach myself VB 2008 and I want to connect to an Access MDB file.  I follow the instructions in all the different books and websites.   I start a new project, choose a new data connection, change the type to Microsoft Access and browse for the file.  When I get the connection string I press "Test Connection" and it's okay.  I then drag either the entire table or just a field to the form.  I use Data -> Preview Data and can see all the rows and columns and the data, so I know the connection has been made.  however, when I press F5 I get a form, but no data and it says "0 records of 0".

I accessed the code and put a MsgBox before and after the "Fill" statement.  The one before pops up, but the second one (below Fill) does not.  I also get "A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll" in the Immediate Window.  I have tried putting a "Try" statement around the code and in this case it will go to the second MsgBox, but still no data.

I'm following what seems to be the most basic and simple method, but I cannot get data in my form.

Any help would be appreciated.

i have problem to transfering data records to my access mdb database as my code here only the reshdrkdatagridview sucessful to trasfer to my access database but my respk1 and rk1stt datagridview cannot be transfer at all and for my rk1stt i need to select all records using the rowcount but not idea how to do it cause the rk1stt should pass all row inside to the access database instead selected the datagridview only   
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

  Dim dcn As OleDbConnection

  Dim data1 As OleDbDataAdapter

  Dim data2 As OleDbDataAdapter

  Dim data3 As OleDbDataAdapter


  Dim G1_select As String = ""

  Dim G2_select As String = ""

  Dim G3_select As String = ""

  Dim G1_value0 As String = ""

  Dim G1_value1 As String = ""

  Dim G1_value2 As String = ""

  Dim G1_value3 As String = ""

  Dim G1_value4 As String = ""

  Dim G1_value5 As String = ""

  Dim G1_value6 As String = ""

  Dim G2_value0 As String = ""

  Dim G2_value1 As String = ""

  Dim G2_value2 As String = ""

  Dim G2_value3 As String = ""

  Dim G2_value4 As String = ""

  Dim G2_value5 As String = ""

  Dim G2_value6 As String = ""

  Dim G2_value7 As String = ""

  Dim G3_value0 As String = ""

  Dim G3_value1 As String = ""

  Dim G3_value2 As String = ""

  Dim G3_value3 As String = ""

  Dim G3_value4 As String = ""

  Dim G3_value5 As String = ""


  dcn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\K1RptStatus.mdb;")

  For Each SelectedRow As DataGridViewRow In Reshdrk1DataGridView.SelectedRows

   G1_value0 = Trim(SelectedRow.Cells(0).Value.ToString)

   G1_value1 = Trim(SelectedRow.Cells(1).Value.ToString)

   G1_value2 = Trim(SelectedRow.Cells(2).Value.ToString)

   G1_value3 = Trim(SelectedRow.Cells(3).Value.ToString)

   G1_value4 = Trim(SelectedRow.Cells(4).Value.ToString)

   G1_value5 = Trim(SelectedRow.Cells(5).Value.ToString)

   G1_value6 = Trim(SelectedRow.Cells(6).Value.ToString)


  For Each SelectedRow1 As DataGridViewRow In Respk1DataGridView.SelectedRows

   G2_value0 = Trim(SelectedRow1.Cells(0).Value.ToString)

   G2_value1 = Trim(SelectedRow1.Cells(1).Value.ToString)

   G2_value2 = Trim(SelectedRow1.Cells(2).Value.ToString)

   G2_value3 = Trim(SelectedRow1.Cells(3).Value.ToString)

   G2_value4 = Trim(SelectedRow1.Cells(4).Value.ToString)

   G2_value5 = Trim(SelectedRow1.Cells(5).Value.ToString)

   G2_value6 = Trim(SelectedRow1.Cells(6).Value.ToString)

   G2_value7 = Trim(SelectedRow1.Cells(7).Value.ToString)


  Dim i As Integer = _



  i = 1

  for each i > 0 

   G3_value0 = Trim(Rk1sttDataGridView.Rows(i).Cells(0).Value.ToString)

   G3_value1 = Trim(Rk1sttDataGridView.Rows(i).Cells(1).Value.ToString)

   G3_value2 = Trim(Rk1sttDataGridView.Rows(i).Cells(2).Value.ToString)

   G3_value3 = Trim(Rk1sttDataGridView.Rows(i).Cells(3).Value.ToString)

   G3_value4 = Trim(Rk1sttDataGridView.Rows(i).Cells(4).Value.ToString)

   G3_value5 = Trim(Rk1sttDataGridView.Rows(i).Cells(5).Value.ToString)


  G1_select = "update tblreshdrk1 set JOB_NO = '" & G1_value0 & "', AA_REGNO = '" & G1_value4 & "', DUTY_AMT = '" & G1_value5 & "', CONSIGNEE = '" & G1_value6 & "'"

  G2_select = "update tblrespk1 set JOB_NO = '" & G2_value5 & "', COUNTER = '" & G2_value0 & "', PRO_DATE = '" & G2_value2 & "', PRO_TIME = '" & G2_value7 & "', STATION = '" & G2_value6 & "', MSG_TYPE = '" & G2_value3 & "', OFFICER = '" & G2_value4 & "'"

  G3_select = "update tblrk1stt set JOB_NO = '" & G3_value4 & "', COUNTER = '" & G3_value5 & "', RES_CODE = '" & G3_value0 & "', ERR_DESC = '" & G3_value1 & "', REMARK = '" & G3_value2 & "', LINE_NO = '" & G3_value3 & "' "


  data1 = New OleDbDataAdapter(G1_select, dcn)

  data2 = New OleDbDataAdapter(G2_select, dcn)

  data3 = New OleDbDataAdapter(G3_select, dcn)


  If data1.Fill(Me.K1dataset.reshdrk1) = True Then


  ElseIf data2.Fill(Me.K1dataset.respk1) = True Then


  End If


 End Sub


hi ,

i have a problem to retreive whole rows of a datagridview and transfer to my new access database in vb environment anyone can give me advice or examples of how to do it ???


for example my datagridview colums have JOB_NO, ERR_DESC , REMARK

now i would to post all row (not selected datagridrow) from this datagridview to my new database .. i search at google using row count may do the job but i still fail on how to do it .. pls and thx for all ur reply


I have sql server x64 running on a system, and an x64 bit program running.

I have access 2010 installed. (x64 bit version)

I am trying to make a linked server but to no avail to an access database and get no ISAM found.

Or I am trying to access the db via my code and get "";  exx.Message = "Cannot start your application. The workgroup information file is missing or opened exclusively by another user."

Well I certainly don't have the file open from anywhere.  What is going on, is it possible to do this?


I've searched and there are the utilities but it ought to be a way to do it programmatically.

Found the following code which I've added to using VS2005 VB.NET code



Function GetData() As DataSet


  Dim ds As DataSet = New DataSet()


  Using cn = New OleDb.OleDbConnection("Provider =Microsoft.JET.OLEDB.4.0;" + "Data Source=" & txtPathtoMDB.Text)




  Dim Schema As DataTable = cn.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, NewObject() {Nothing, Nothing, Nothing, "TABLE"})


  For i AsInteger = 0 To Schema.Rows.Count - 1


  'Dim dt As DataTable = New DataTable(Schema.Rows(i)!TABLE_NAME.ToString())


   Dim dt As DataTable = New DataTable(Schema.Rows(i).Item("TABLE_NAME"))


   Using adapter = New OleDb.OleDbDataAdapter("SELECT * FROM " + Schema.Rows(i).Item("TABLE_NAME"), cn.ToString)


   'above line gives me a "Format of the initialization string does not conform to specification starting at index 0" error






Next i




Return ds



I keep getting the "Format of the initialization string does not conform to specification starting at index 0" error


Any ideas what I'm doing wrong?  After I get the mdb into a dataset I can convert to SDF I think.  Is there a better way?






I need to convert a mdb to a txt file. From a colegue I understood that this can be done wit SSIS (Sequel Server Integration Services). The mdb is the incidents.mdb from Forefront. This conversion needs to be performed on a regular basis so a GUI driven solution won't do, it has to be done by a script that will be scheduled.

How can I accomplish this?

Kind Regards,
Jan Schouls




I am trying to convert my DB field OLE Object as Bitmap into a Picture Box. In my DataBase there are 2 fields

1) Text

2) OLE Object (bitmap)

I am having problems trying to get the MS Access Database to equal the picture box. What I have so far is

PrivateSub FindChemical()

Dim intDataBaseIndex AsIntegerDim rowIndex AsIntegerDim FieldRow As DataRow
Dim FieldRow2 As Bitmap
intDataBaseIndex = Chemistry2aDataSet.Chemicals.Rows.CountFor rowIndex = 0 To intDataBaseIndex - 1
FieldRow = Chemistry2aDataSet.Tables("ChemicalName").Rows(rowIndex)
FieldRow2 = Chemistry2aDataSet.Tables("StructuralFormula").Rows(rowIndex)

If txtWord.Text = FieldRow("ChemicalName").ToString Then

PictureBox.Image = FieldRow("StructuralFormula")
EndIfNext rowIndex
The structuralformula is a field inside MS Access that is an OLE Object (bitmap). How do I get the OLE Object into the picturebox?


I've been asked by one of our customers to get some information via SQL server from a MSAccess .MDB file.  SQL Server is running on a separate clustered server while the .MDB file exists out on a file share out on NAS.

We typically don't get into MS Access support here where I work so unfamiliar with the process and even if possible.  Does MS Access need to be running or can the file be accessed via SQL Server's via Linked Server?  Been trying different combos of configuring the linked server but so far no luck. Any particular OLE or ODBC driver I should attempt to use?  Ideally would like to be able to query the MSacess tables directly from SQL.  Any preferred method once the access method is understood?  OpenQUery?

Any advice or links would be appreciated.  Will continue to research thru the sites in the meantime





Hi there

I am busy with a program that is database orientated. I successfuly open my database and display its contents in the datagridview. When I add/edit the information in the datagridview, and click SAve, the information is successfuly updated/added to the database.

My problem is this :

I have an 'Add Item' button on the datagrid form. Clicking this, opens a new form where the columns of the database are displayed as textboxes. I complete the info in all the fields, but when I click SAVE on this form, it doesn't write the info to the database. Instead, I get an error ( Syntax error in INSERT INTO statement ).

Here is part of my code :



Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click


Dim conn AsNew OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=E:\Project\Items.mdb")


Dim sql AsString = String.Empty


If _itemID = 0 Then

sql =

"INSERT INTO Items (Order_Id, .....,......,.....,....., Shipping_Date)" _


"VALUES(" & txtOrderID.Text & ", " ......", "...... ", " & txtShipDate.Text & ")"





Dim command AsNew OleDbCommand(sql, conn)





Catch ex As OleDbException



Catch ex As Exception







I don't think the code is incorrect. I may be wrong, but I think the problem could be with the way the actual Items.mdb databse hase been setup? I do have a primary key, increasing incrementally with each new row

I am really struggling with this, and am considering leaving this out altogether, letting users only add/edit/delete on the actual datagrid.

Any assistance would be greatly appreciated.



I designed a simple database with 2 tables using MS SQL Express 2008 which I tried to open using MS C# Express 2008 but when I try to set up the Database Connection using the Database Connection Wizard I get error :=

The file cannot be opened because it is being used by another process. Please close all applications that might access this file and try again.

I even Disconnected the Instance in SQLExpress Instance before closing down MS SQL Express 2008.

If a reboot the PC then I can use the Database Connection Wizard from c# (but I don't want to have to reboot my PC as its annoying).

Does anyone have the simple answer please.

Thank you



I try to change by linked table connections using the following code, I dont receive any error message but when I check the data in my tables, and also the related Links from "Linked Table Manager", my tables are still link to the old DB not to the one I asked for.


here is the code I used.

Private Sub Archive_DB_But_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

  Dim dbsTemp As Database

    Dim tdfLinked As TableDef

    Dim rstLinked As Recordset

    Dim StrConnect As String


    StrConnect = ";DATABASE=Q:\Developing\Tables_Arch.mdb"


    ' set an object to the currently openned MS Access database

    Set dbsTemp = CurrentDb


    ConnectOutput dbsTemp, _

                    "tbl1", _

                    StrConnect, _



    ConnectOutput dbsTemp, _

                    "tbl2", _

                    StrConnect, _



    ConnectOutput dbsTemp, _

                    "tbl3", _

                    StrConnect, _



End Sub


Sub ConnectOutput(dbsTemp As Database, _

    strTable As String, StrConnect As String, _

    strSourceTable As String)


    Dim tdfLinked As TableDef

    Dim rstLinked As Recordset

    Dim rstRemote As Recordset


    ' Create a new TableDef, set its Connect and

    ' SourceTableName properties based on the passed

    ' arguments, and refresh the LINK it to the TableDefs collection.


    Set tdfLinked = dbsTemp.CreateTableDef(strTable)

    tdfLinked.Connect = StrConnect

    tdfLinked.SourceTableName = strSourceTable

   ' dbsTemp.TableDefs.Refresh



I have a VB6SP6 application which uses ADO to open and write to MSAccess mdb files.  I create a package with the PDW and it runs perfectly when i install the package on a PC with XPpro SP3 on it.  When I try to install the same package on a Windows98SP2 PC with MDAC2.6 already on it I get "Runtime error 430 Class does not support Automation or does not support expected interface".

Can anyone out there advise me what I need to do to get the W98 PC running?

Many thanks Nealt1234 

I am trying to download wirelessly or cradled, data from 3 Access 2003 tables into my SQLCE 3.5 datatables. I already have a successful method + web method that uploads data from my sqlce datatables into the Access 2003 tables. I just need feedback to know if I'm headed in the right direction.

Web method:
 Public Function UpdateSqlCeData(ByVal downloadSet As DataSet) As Boolean
        ' Connect to Access DB here, execute command and populate data set with returned data.
        Me.Server.ScriptTimeout = 600000
        Dim strSql2 As SqlCeCommand 
        Dim oleDbDataset As System.Data.DataSet = New DataSet
        Dim sqlParam As New SqlCeParameter
        Dim fhAccDt, fhCeDt As New DataTable

        strSql2 = Nothing
        sqlParam = Nothing
        'Connection string to connect to access DB
        Dim FHLiveDB As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\testpre\testservertest.mdb")
      Dim Pbrd As New OleDb.OleDbDataAdapter("SELECT * FROM tblProductBrand", FHLiveDB)



        With strSql2
            .CommandTimeout = 600000
            .CommandText = "INSERT INTO Product_Brand ([BrandID],[Brand_Name]) VALUES (@Brand_ID,@Brand_Name)"

            sqlParam = .Parameters.Add("@Brand_ID", SqlDbType.NVarChar, 50, "Brand_ID")
            sqlParam.SourceVersion = DataRowVersion.Original

            sqlParam = .Parameters.Add("@Brand_Name", SqlDbType.NVarChar, 200, "Brand_Name")
            sqlParam.SourceVersion = DataRowVersion.Original

 End With



End Function
App Code to interact with Web Method:
Private Sub btnDlInv_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDlInv.Click

        Dim download As New Student.FHSync

            'Add tables to the download set

            'try to download here
            download.Timeout = 600000
            If download.UpdateSqlCeData(downloadSet) Then
                MsgBox("Inventory Download Successful", MsgBoxStyle.OkOnly)
                btnDlInv.Enabled = False
            End If

        Catch dl_err As Exception
            MsgBox("Inventory download Failed", MsgBoxStyle.Exclamation, "Failure")
            MsgBox(Err.Description, MsgBoxStyle.Question, "Error Description")
            MsgBox(ErrorToString, MsgBoxStyle.Question, "ErrorToString")
            MsgBox(Err.GetException.Message, MsgBoxStyle.Question, "Exception")
            Exit Sub
        End Try

End Sub

Public Sub ClearInv()
End Sub


I attempted to use 'Import Export Data' tool to import an Access 2003 mdb file into SQL Server 2008r2.  I didn't develop the Access file.  I get an 'Error 0xc0207015 - The data source column names must be unique'

This is coming from one of the queries that accesses a few tables.  What is the easiest way to see which tables need to have a column changed or edit the query?  And also, too, how do I see whether other queries will have the same problem?

Thanks,  Bill




I have an Access 2003 mdb file that I want to connect to and run/export queries within it. How can I do that? As in, what technology should I use for this? I don't want to use JET or anything that doesn't support such functions as REPLACE, INSTRREV, etc.




Hi i am paco

im from mexico df

my post this solution in godaddy conect ms access in web.config

<?xml version="1.0"?>
<!-- -->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
      <!-- FILE DSN -->
      <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:/Hosting/6702198/html/access_db/css.mdb" providerName="System.Data.OleDb" />
      <!-- MDB FILE-->
    <add name="ConnectionStringODBC" connectionString="Driver={Microsoft Access Driver (*.mdb)};DBQ=D:/Hosting/6702198/html/access_db/css.mdb" />
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        <compilation debug="false" />
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
            <authentication mode="Windows" />
        <customErrors mode="Off"/>
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />

<?xml version="1.0"?>

<!-- -->

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">



      <!-- FILE DSN -->

      <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:/Hosting/0123456/html/access_db/database.mdb" providerName="System.Data.OleDb" />

      <!-- MDB FILE-->

    <add name="ConnectionString" connectionString="Driver={Microsoft Access Driver (*.mdb)};DBQ=D:/Hosting/0123456/html/access_db/database.mdb" />




            Set compilation debug="true" to insert debugging 

            symbols into the compiled page. Because this 

            affects performance, set this value to true only 

            during development.


        <compilation debug="false" />


            The <authentication> section enables configuration 

            of the security authentication mode used by 

            ASP.NET to identify an incoming user. 

            <authentication mode="Windows" />



        <customErrors mode="Off"/>


            The <customErrors> section enables configuration 

            of what to do if/when an unhandled error occurs 

            during the execution of a request. Specifically, 

            it enables developers to configure html error pages 

            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

            <error statusCode="403" redirect="NoAccess.htm" />

            <error statusCode="404" redirect="FileNotFound.htm" />





I'm hoping to connect an SQL CE file (main.dat) to an Access DB so I can run some vba code which:

1. Uses DAO to open a recordset (a table in the SQL CE DB)
2. Uses a field containing paths to mp3 files to extract the id3 tag data
3. Update an existing field from the same table/Same SQL CE DB

I've looked around and can't seem to find any ODBC driver(s) for SQL CE.  Got some info from Erik who suggested I post here.

Thanks in advance!

EDIT:  I just now was able to get Erik's code to work in Excel from my DB.  But I'm not sure how to send it back to the SQL CE DB from VBA... Is it possible?


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure