Home > database >  The stored procedure to realize different data source switching
The stored procedure to realize different data source switching

Time:10-01

At first I have the data of data window is displayed (grid)
I want to write code in control
Used for switching data window way (freeform)
It is said that you can use stored procedures to achieve but
Don't know how to implement
Temporarily suspended
Or are there other ways, thank you...

CodePudding user response:

Dw right click edit source
The grid processing=1
Tabular processing=0
The grid and tabular change this can convert

Wants to change the grid directly free, can't realize it

CodePudding user response:

Can modify the dw dataobject, another free association types of dw object

CodePudding user response:

Ding ding!!!!!!!!!!!!!!!!!!!!!!!!!

CodePudding user response:

In principle is not to achieve,

CodePudding user response:

Define two datawindow object, one grid other one free
Modify the data through the code window control data window object, to realize switching between two data window object

CodePudding user response:

Either you dynamically generate the data window, not can't

CodePudding user response:

Do datawinodw, save the entire datawindow syntax to the database. Using dw_1. Call the create (ls_dwsyntax ls_err) new, it can at any time in the database. Don't have to rewrite the program

CodePudding user response:

I haven't heard of a stored procedure can change the pb data window object display format: -),
Only in pb code dynamically generated data window object or do two data window object to switch back and forth

CodePudding user response:

Stored procedure is absolutely not, the reason is as follows:
Stored procedure is responsible for providing the data to you, only you is how to display the DW, and stored procedures or even your database system type doesn't matter, you use MSSQL and DB2 results are the same), so you will be confused with interface data.

But also understand your intentions, you only need to build a FREE DW, and using the following syntax switch:

Dw_1. Dataobjec='d_free'
Dw_1. Settransobjec (sqlca)
Dw_1. Retriver (parameters)

To switch back the GRID display is:
Dw_1. Dataobjec='d_grid'
Dw_1. Settransobjec (sqlca)
Dw_1. Retriver (parameters)

Your original stored procedure remains the same. It's as simple as that.

CodePudding user response:

Directly modifying the datastore dataobject properties
Remember settransobject after every change
  • Related