PB实用技巧

Changing DataWindow object by code methods

string error_syntaxfromSQL, error_create

string new_sql, new_syntax

new_sql = 'SELECT emp_data.emp_id, emp_data.emp_name from emp_data' &

+ 'WHERE emp_data.emp_salary> 45000'

new_syntax = SQLCA.SyntaxFromSQL (new_sql, 'Style (Type = Form)', error_syntaxfromSQL)

IF Len (error_syntaxfromSQL)> 0 THEN // Display errors

mle_sfs.Text = error_syntaxfromSQL

ELSE // Generate new DataWindow

dw_new.Create (new_syntax, error_create)

IF Len (error_create)> 0 THEN

mle_create.Text = error_create

END IF

END IF

dw_new.SetTransObject (SQLCA)

dw_new.Retrieve ()


你可能感兴趣的:(PB实用技巧)