dbTalk Databases Forums  

Programatically use import wizard to import sdf file

comp.databases.btrieve comp.databases.btrieve


Discuss Programatically use import wizard to import sdf file in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Programatically use import wizard to import sdf file - 04-24-2006 , 03:00 PM






Hi. I am using Pervasive 8.6. Every couple of months we receive an
sdf file which we load to a table. To do this I use the import wizard.
I would like to automate this process. Is this possible? After
installing the clients tools, I noticed something called
ImportWizRSIApp under References in Visual Basic. It has attributes
like DBName, Path, ServerName, etc.... It looks like this would work
but I keep getting "ActiveX component can't create object" errors when
trying to invoke it. Since I haven't seen any documentation on this
component I'm not sure if it's possible to use it this way. Does
anyone have experience with this? Thanks.


Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Programatically use import wizard to import sdf file - 04-29-2006 , 08:32 AM






The following knowledgebase article explains how to use it. If you
need command line access, then my SQLEXEC application will allow you to
do the import from the command line, without writing your own
application.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Austin: Pervasive Service & Support Class - 05/2006 ***
*** Chicago: Pervasive Service & Support Class - 07/2006 ***




ID: psql2430 - How do I use the Pervasive Import Wizard in my
application?

Description: How do I use the Pervasive Import Wizard in my application?
Environment: Pervasive.SQL 2000, Microsoft Visual Basic 6.0

Import Wizard
Solution: While accessing the COM object that encapsulates the
Pervasive Import wizard may work, it is not a recommended solution.
Below is code that shows how to access the Import Wizard from Visual
Basic v6.0 accessing the Import Wizard included with Pervasive.SQL
2000i SP3.
Note: The ImportWizard COM object will need to be added as a reference
in the Visual Basic project.

Dim oImportWizard As New ImportWizApp
With oImportWizard
Rem sets the format to read the imported file
..IsFormatSDF = 1
Rem sets the database name
..DBName = "DEMODATA"
Rem sets whether the first row has column names or not.
..IsColNamesFirstRow = 1
Rem sets the location (path and filename) for the file to be read.
..Path = App.Path & "\import.sdf"
Rem skips filled pages
..SkipFilledPages = 1
Rem sets the Pervasive table name data will be imported into.
..TableName = "TestTable"
Rem this actually starts the wizard.
..Run
End With
Set oImportWizard = Nothing

mbosco51 (AT) hotmail (DOT) com wrote:

Quote:
Hi. I am using Pervasive 8.6. Every couple of months we receive an
sdf file which we load to a table. To do this I use the import
wizard. I would like to automate this process. Is this possible?
After installing the clients tools, I noticed something called
ImportWizRSIApp under References in Visual Basic. It has attributes
like DBName, Path, ServerName, etc.... It looks like this would work
but I keep getting "ActiveX component can't create object" errors when
trying to invoke it. Since I haven't seen any documentation on this
component I'm not sure if it's possible to use it this way. Does
anyone have experience with this? Thanks.


Reply With Quote
Reply




Thread Tools
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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.