PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Convert data dictionary data files to SQL tables  (Read 2050 times)

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Convert data dictionary data files to SQL tables
« on: July 25, 2018, 06:50:56 AM »
Hi,
   I have installed and configured PxPlus SQL ODBC driver and PxPlus SQL server. how can i convert data files in data dictionary to sql. 
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Convert data dictionary data files to SQL tables
« Reply #1 on: July 25, 2018, 09:12:21 AM »
I am not to sure what you mean when you say "convert data files in the data dictionary to sql".

The PxPlus SQL ODBC driver and PxPlus SQL Server products are used to access PxPlus data file from third party applications like MS Excel using SQL statements i.e. "SELECT * FROM invoices".

The PxPlus SQL ODBC driver is used when the PxPlus data and the third party application are on the same machine. The PxPlus SQL ODBC driver and the PxPlus SQL Server are both used when the PxPlus data and the third party application are on different machines.

If this is what you are trying to do then you need to look at the documentation for instructions on how to configure and use:

https://manual.pvxplus.com/?odbc/configuration_procedures.htm
https://manual.pvxplus.com/?odbc/using_odbc_driver.htm

If what you want to do is convert your PxPlus data into relational database tables like for example MS SQL Server tables then you would not use those products at all. What you would do is use the [ODB] or [ADO] special file interface to connect to the relational database and you could create the table and copy in the data from your PxPlus data via a PxPlus program.

https://manual.pvxplus.com/?command_tags/odb.htm
https://manual.pvxplus.com/?command_tags/ADO.htm

To create the table you would do a WRITE RECORD (odb_chan) "CREATE TABLE ...". To make this easier you can from the data dictionary maintenance panel go to the utilities menu and select generate external and then select SQL Create Table. This will give you a SQL CREATE TABLE command for the current table selected in the data dictionary maintenance panel.

To copy the data in you could just do a loop that reads a record from the PxPlus data file and then does a WRITE RECORD (odb_chan) "INSERT INTO ..."
Principal Software Engineer for PVX Plus Technologies LTD.

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Re: Convert data dictionary data files to SQL tables
« Reply #2 on: July 31, 2018, 06:31:18 AM »
Hi Devon,
    Thank you so much for the great explanation. i followed your instructions, and found solution on my requirement.


Thanks,
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.