Solved

Paradox to MS-SQL

Posted on 2000-04-02
5
318 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now