Solved

Paradox to MS-SQL

Posted on 2000-04-02
5
325 Views
Last Modified: 2010-05-02
Hi ...,

I need some code, for converting my paradox table into MS-SQL table.
(using ADO is prefered)

and I'll give 100 more points, If someone also can convert the table structure (in paradox format) into MS-SQL format

Thanks

 Dewi
0
Comment
Question by:Dewi
5 Comments
 
LVL 15

Expert Comment

by:cquinn
ID: 2683712
A quick and dirty way is to import the table into Access using the standard import filters, then use the SQL upsizing wizard to get it on the SQL server.  If it is a one-time conversion exercise, this will be the quickest way to do it!
0
 

Expert Comment

by:viveksarin
ID: 2684812
what cquinn is saying is right. but tell more about the project or problem.
0
 
LVL 1

Accepted Solution

by:
cchenoweth earned 100 total points
ID: 2685775
dim pDB as New ADODB.Connection
dim db as New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim pRS as New ADODB.Recordset
With db
 .ConnectionString = "driver={SQL Server};server=DbSERVER;uid=USERNAME;pwd=PASSWORD;database=DB in Server;"
 .ConnectionTimeout = 10
 .Open
End With
pDB.ConnectionString = "Driver={Microsoft Paradox Driver (*.db)};DBQ=physical path to .db file;DriverID=26"

  rs.open "SELECT * FROM TABLE1;", db, adopendynamic, adopenreadonly
  Prs.open "SELECT * FROM TABLE2;", Pdb, adopendynamic, adopenoptimistic
    /\/\/\/\ Not sure on the Paradox statement there.

  Do while not rs.eof
    prs.addnew
    rs!data = Prs!data
    prs.update
  rs.movenext
  Loop
rs.close
prs.close


This is my real quick answer.  I have better code if you email me. Hard to type in this box!!

cchenoweth@pensoft.com

0
 
LVL 1

Expert Comment

by:cchenoweth
ID: 2685780
oh..  be sure to open the pDB connection.  I forgot to put that in there.

pdb.open
0
 

Expert Comment

by:tomhines
ID: 2788719


I used the paradox enum methods to create a database of all of the table structures by database name. Then I wrote scripts to create VBA code to create the tables in Access. We had over 50 paradox databases, with a total of over 3000 tables. Once you have the table and field lists you can create default forms in access.

For paradox for dos version 4.5 you can write a program to parse the table and field lists from the form and report files. These files have extensions such as .f* and .r*. Then you can use the field list from the forms and reports to create the access forms and reports. We have over 80,000 paradox files to convert using this method so I am writing a program that will process the data dictionary and parse the paradox files and then generate the databases and forms in access. The program I am writing also takes out characters such as _, -, #, @, $, ., /, to make the database ODBC compliant.

I am also working on a table of equivalents to convert the 4500 paradox queries that we have to SQL. Let me know if you need to do this.

It will take some work but I will try to list the code for all of this as well.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question