Home > database > Which tall person guide genuflect is begged! About the SQLCA. SyntaxFromSQL SQL strange questions
Which tall person guide genuflect is begged! About the SQLCA. SyntaxFromSQL SQL strange questions
Time:11-09
The following code is executed prompt "SQL syntax error", but if it's not select into assigned to str_sql instead of directly using the//part can be normal operation, the SQL statement is a punctuation is not bad, which tall person guide genuflect is begged!
Select SQL into: str_sql from qhd_wht_sql where submenu_name='11'; //str_sql="select device_number number, cust_name user name, credit_value/100 credit from DWD. Dwd_o_serv_day_182 a, qhd_qyx_number4 b where a.a cct_month='" + sle_1. Text +"' and a. d. ay_id='" + sle_2. Text + "' and Anderson f_valid='1' and a. d. evice_number=b.m y_number "
Str_syntax=SQLCA. SyntaxFromSQL (str_sql, 'style (type=grid)', str_err_sql) If len (str_err_sql) & gt; 0 then Messagebox (" error ", "obtain the SQL syntax error") Return The else Dw_2. Create (str_syntax str_err_create) If len (str_err_create) & gt; 0 then Messagebox (" error ", "an error occurred when creating data window!" ) Return End the if End the if Dw_2. Settransobject (sqlca) Dw_2. Retrieve ()
CodePudding user response:
Select SQL into: str_sql... Variable is embedded SQL, used to remove the values in the From the select device_number number... Is a standard SQL, standard SQL can use SyntaxFromSQL