Home > database >  Ask: how to export data in PB
Ask: how to export data in PB

Time:10-05

Use PB + SQL2000 to write good software, now I want to have some data export, and exported as ASA database. How to do ah, everybody to help.

CodePudding user response:

Use data pipeline, directly if the data is to use data window!!!!

CodePudding user response:

If not, the save rows as/import, soon

CodePudding user response:


The transaction oss
Oss=create transaction
Oss. DBMS="ODBC"
Oss. The AutoCommit=False
Oss. DBParm="ConnectString='DSN=XXXX; UID=XXXX. The PWD=XXXX '"
Connect using oss;

//dynamic data window dw_99 create instance
//string lsSQLstr lsDWsyntax, lserrC, savestr, indexstr, lssqlstr_id, savestr_id
String lserr lsSQLstr, lsDWsyntax lserrC, savestr, indexstr, lssqlstr_id, savestr_id
Boolean lb_return//the return value
LsSQLstr="select * from XXX"
LsDwsyntax=OSS. SyntaxFromSQL (lsSQLstr, "style (type=Grid)", lserr)
String ls_create, ls_err
String ls_sql
Ls_create=OSS. SyntaxFromSQL (lsSQLstr, "style (type=grid)", ls_err)
If len (ls_err) & gt; 0 then
MessageBox (" error ", "SQL statement error!" )
Return
End the if
Dw_99. Create (lsDwsyntax lserrC)//Create the dynamic data window dw_99
If Len (lserrC) & gt; 0 Then
//if failed to create dynamic data window dw_99, shows error message and exit the
Messagebox (" error!" , lserrC)
Return
End the if
//the following setup dw_99 some attributes, but according to actual needs, set up,
Dw_99. X=5
Dw_99. Y=5
Dw_99. Width=4000
Dw_99. Height=400
Whether dw_99. Visible=true//display export table data
Dw_99. Enabled=True
Dw_99. HScrollBar=True
Dw_99. VScrollBar=True
//for dw_99 distributed transaction object SQLCA
Dw_99. SetTransObject (oss)
//to extract data
Dw_99. Retrieve ()
//saveas datawindow
Savestr='b: \ test. DBF'
Lb_return=(dw_99 saveas (savestr, dBASE3! , true)=1)

//destroy dw_99
SetPointer (Arrow!
If lb_return then
Messagebox (hint! "" , "the export file success")
The else
Messagebox (hint! "" , "the export file failed")
end if

CodePudding user response:

If your system has been installed ASA database driven, in your SQL Server 2000 export data source can be selected in the SQL and select the table to export and export to the ASA, as for the ASA to have the same table in this problem, if the table manually create fewer, if too much will use Sybase PowerDesigner forward and reverse engineering function to create the same ASA database tables with SQL,

CodePudding user response:

After the need to focus on, now but first, let me help you
  • Related