Home > database >  Why can't the custom for help: the global variable transaction object
Why can't the custom for help: the global variable transaction object

Time:09-26

In the application of declare global variables declared in the transaction object sqluser but there is an error, said: Illegal data type: sqluser
What reason is this excuse me?

CodePudding user response:

This statement:
The transaction sqluser

CodePudding user response:

Thank caove, that is how I define, but prompt error

CodePudding user response:

Should not be an error:
Right-click regenerate try

CodePudding user response:

After writing the statement, CTRL + L, to save again

CodePudding user response:

Thank caove enthusiastic help very much, the way you try or not, whether to help see what reason be? This is associated with the version of PB?

CodePudding user response:

You of these two Spaces in the middle of the English word is full of input Angle state Spaces, so no, replace it with half Angle of try
This is the whole Angle, it will prompt you said wrong
 transactionsqluser 

This is half Angle, can save
 transaction sqluser 

CodePudding user response:

Thank you yyoinge
Not all Angle half Angle problem, enter the Angle of space, PB will full Angle space shows red errors

CodePudding user response:

The code posted to see

CodePudding user response:

Made a mistake should define the place,

CodePudding user response:

If you haven't done add my QQ: 10308237, remote one minute to solve;

CodePudding user response:

Thank you enthusiastic help upstairs

Code is like this:

The first is to declare global variables:
The Transaction sqluser

The application of the open () event:
Sqluser=create transaction

Sqluser. DBMS="ODBC"
Sqluser. The AutoCommit=False
Sqluser. DBParm="Connectstring='DSN=mybook'"

CONNECT USING sqluser;

If sqluser. SQLCode & lt; 0 then
Messagebox (" connection ", "the reason for failure:" + sqluser. SQLErrText, StopSign!)
The HALT CLOSE//terminate the system run
End the if

Application of the close () event
DISCONNECT the USING sqluser;

If sqluser. SQLCode & lt; 0 then
Messagebox (" disconnect "failure," the reason for failure: "+ sqluser. SQLErrText, StopSign!)
End the if

Destroy sqluser

CodePudding user response:

Out of spirits, try to create a new application, see can define you can't,
  • Related