Solved

Paradox to MS-SQL

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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

21 Experts available now in Live!

Get 1:1 Help Now