Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Pervasive.SQL > Text file import to psql v10

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-26-08, 17:29
ktforums ktforums is offline
Registered User
 
Join Date: Jun 2008
Posts: 3
Text file import to psql v10

Hi all,

I have a non-delimited(continuous, no space,commas,tab,etc.) text file that I need to import into a pervasive psql table. I am having trouble using the import wizard from pervasive control center(pcc). I get syntax error when I try using pcc to import this text file. Is Bulk Data Utility(btu) my best option of importing data into psql table? If so, what kind of command would I need to use? Also, I tried using Excel to add a column and save as tab delimited or comma delimited.....still no luck.

This file was originally a file.df format which I receive as a text file to help me import. Is there a better solution of importing a file.df(datafile) from pervasive database v. 8 to a pervasive psql v.10?

I assume from my research:
To run the BDU with the default options:
bdu demodata BDU_Table C:\data_file.txt

This command doesn't seem to solve my non-delimiter issue.

Could DDF Builder be the solution?
Reply With Quote
  #2 (permalink)  
Old 06-26-08, 17:36
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
How was the file created? The PSQL tools are going to need to know how to interpret the data. Why not just get a copy of the original file? There's really no need to export/import the data.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 06-27-08, 10:35
ktforums ktforums is offline
Registered User
 
Join Date: Jun 2008
Posts: 3
Text file import/transfer

The psql v.10 is installed on a new dev server (window server 2008). The file(savecode.df) came/created from pervasive version 8. The company uses cobol II to access it. My task is to help convert from cobol to asp.net 2.0. They have their own cobol programmer; I am helping to develop a new application in asp.net 2.0. But they would like to convert datafile(savecode.df) to Pervasive v.10. The new application, being in development, will access this new/transfered data in Pervasive v.10.

I am assumeing you are saying that I can somehow transfer the old datafile from Pervasive 8(ex. savecode.df) to Pervasive v.10? If so how would I do that?

Sorry I am so new to Pervasive. Only thing I managed to do is connect to Pervasive v.10 and do select statement.
Reply With Quote
  #4 (permalink)  
Old 06-27-08, 10:57
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
If the "savecode.df" is a Btrieve data file, then you can simply copy it from the old server to the new server and start accessing it through Btrieve. To use ODBC/OLEDB/etc, you would need to have DDF files (FILE.DDF, FIELD.DDF, INDEX.DDF, and others). Is the older COBOL application going to be accessing this data as well as the ASP.NET application?
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #5 (permalink)  
Old 06-27-08, 16:22
ktforums ktforums is offline
Registered User
 
Join Date: Jun 2008
Posts: 3
I am sorry, I was mis-inform or misunderstood. The savecode.df came from btrieve, version 6 (I think as the manager have to check to be sure). They are using Pervasive version 8 at the moment but they didn't convert at all.
The new Pervasive psql v10 are installed on a separate dev server.

Once all is done, the new asp.net 2.0 will be the only application accessing the Pervasive database. In any case, both Cobol and asp.net 2.0 will be separate anyway.

You mentioned that I can copy it. But I am not sure how. I can only assume you mean I can use the new dev server, psql v10, to copy from old server to new.

Maybe i'll figure that out once they give me access to the btrieve file some day.

Thanks for the help so far.
Reply With Quote
  #6 (permalink)  
Old 06-27-08, 17:28
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
By "copy", I mean you can use Windows Explorer and copy the file from the old server to the new server. PSQL doesn't even need to be running to copy the file from one location to another. Btrieve files don't have to be "attached" or "detached" like SQL Server databases.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On