CodePudding user response:
If it is DW saveas directly ()CodePudding user response:
Instead of the dw import from the outside to save the PDF to SQLCodePudding user response:
Blob bbBb.=ole_1 objectdata
The SQLCA. The AutoCommit=TRUE
Updateblob hejbxx
Set the PDF=: bb
Where hejbxx. Contract number=: bh
;
The SQLCA. The AutoCommit=FALSE
//commit using sqlca;
IF the Sqlca. SQLNRows & gt; 0 THEN
COMMIT;
Messagebox (' message ', 'save the success! ')
The Else
The Rollback.
Messagebox (' message 'and' file save failed! '+ sqlca. Sqlerrtext)
END the IF
Save failed, please have a look
CodePudding user response:
The building Lord what control is used to invoke the PDFWhat is the content of the error message
CodePudding user response:
Ole tip save failedCodePudding user response:
I use the following code to test it and see what error message is, in addition has been made in bb dataBlob bb
String ls_err
Bb.=ole_1 objectdata
Messagebox (" ABC ", string (len (bb)))
Updateblob hejbxx
Set the PDF=: bb
Where hejbxx. Contract number=: bh.
//commit using sqlca;
IF the Sqlca. SQLNRows & gt; 0 THEN
COMMIT;
Messagebox (' message ', 'save the success! ')
The Else
Ls_err=sqlca. Sqlerrtext
The Rollback.
Messagebox (' message 'and' file save failed! '+ ls_err)//after the rollback sqlerrtext content is the message of the rollback operation
END the IF
CodePudding user response:
Just use this tip two syntax errorCodePudding user response:
Before the code promptThe rollback transaction request not corresponding to the begin transtion
CodePudding user response:
I use the following code to test it and see what error message is, in addition has been made in bb dataBlob bb
String ls_err
Bb.=ole_1 objectdata
Messagebox (" ABC ", string (len (bb)))
Updateblob hejbxx
Set the PDF=: bb
Where hejbxx. Contract number=: bh.
//commit using sqlca;
IF the Sqlca. SQLNRows & gt; 0 THEN
COMMIT;
Messagebox (' message ', 'save the success! ')
The Else
Ls_err=sqlca. Sqlerrtext
The Rollback.
Messagebox (' message 'and' file save failed! '+ ls_err)//after the rollback sqlerrtext content is the message of the rollback operation
END the IF
ABC=9274880
CodePudding user response:
Whether the building Lord, before executing SQL statements have database connectionSuch as
//the SQLCA. DBMS="ODBC"
//the SQLCA. The AutoCommit=False
//the SQLCA. DBParm="ConnectString='DSN=test; UID=dba; The PWD=SQL '"
//
//CONNECT USING the SQLCA.