Re: Using Access 2003 to Link to Paradox Data

From: G. Vaught (glvaught_at_hotmail.com)
Date: 10/16/04


Date: Sat, 16 Oct 2004 13:38:24 -0600

Don't use the ODBC choice, try using the Paradox choice when linking the
tables?

"Noah Kaufman" <NoahKaufman@discussions.microsoft.com> wrote in message
news:825C0E4B-52D5-434A-9031-5869DCF9FA6C@microsoft.com...
> First off - let me say that this whole process is way more difficult than
> it
> should be. Microsoft really blew it when setting up the whole idea of
> linked
> tables.
>
> I have a piece of software from a third-party that uses Paradox 4.x to
> store
> it's data. I have set up an ODBC data source, and I can use Microsoft
> Word
> to open the Paradox tables individually and get data. (Like for a mail
> merge.)
>
> So I know my ODBC connection set up works.
>
> I now need to combine information in two of the Paradox tables (also as
> part
> of a mail merge process). It would seem that Access would be perfect for
> this, since I should be able to simply create a new database, and then
> link
> the tables I need from the existing Paradox data.
>
> It doesn't work, and that is my problem.
>
> After reading lots of posts, I realized that I simply can't do the
> intuitive
> thing -- which would be to use "File" -> "Get External Data" -> "Link
> tables"
> to get the data out of Paradox and into Access. Attempting to do this
> gets
> me the dreaded "You can't use ODBC to import external Microsoft Jet or
> ISAM
> databases" error message.
>
> So looking at some other posts, the recommended method around this seems
> to
> be to write some VBA code to link the tables. Following a reference from
> another poster, I read the Microsoft white paper on this, and wrote the
> following code:
>
> Public Sub AddLinkedTable1()
> ' Open the Microsoft Access database named Test.mdb.
> Set CurrentDatabase =
> DBEngine.Workspaces(0).OpenDatabase("C:\ClientTest.mdb")
> ' Create the TableDef object.
> Set MyTableDef = CurrentDatabase.CreateTableDef("Attached Paradox Table")
> ' Set the connection information.
> MyTableDef.Connect = "Paradox 4.X;DATABASE=T:\Timeslips data\"
> MyTableDef.SourceTableName = "NAME"
> ' Append the TableDef object to create the link.
> CurrentDatabase.TableDefs.Append MyTableDef
> ' Display a confirmation message.
> MsgBox "Finished attaching " & MyTableDef.SourceTableName & ".", 0
> End Sub
>
> The problem is that although this does create a linked table, it still
> doesn't work because I am now getting another error message:
> "Unexpected error from external database driver (11270)."
>
> This error occurs both when I run my VBA code, and also when I attempt to
> click directly on the linked table entry from the "Tables" listing for my
> test Access database.
>
> Can someone please shed some light on what I'm doing wrong here, and how I
> can fix this "unexpected error" thing? Thanks much, in advance.
>
> Sincerely,
>
> Noah Kaufman
>
>