Skip to main content
Skip table of contents

Sage: execute SQL (ExecuteSQLCall)


Sage: execute SQL (ExecuteSQLCall)

Read the data from any table. The SQL command to be executed is transferred in the input parameter group via the parameter statement. The field names to be read are entered in the parameter names and are separated by a comma. These names should be contained as parameters in the target parameter group, otherwise they cannot be assigned. You must also take special care that the column list entered in the SQL command corresponds with the name list.

If an SQL command that writes or deletes is executed, Count should be given as the name. The number of affected data records is written on this parameter.

The function returns all data lines found inside an indexed parameter group. The indexation of the parameter group is adjusted if necessary. If data was not found, or if the SQL command was invalid, the service delivers a corresponding error message. This is entered via the parameter Message. Before evaluating the output parameter group, the parameter Message should be verified.

Syntax:

Status = f$SageService ( Service , 'ExecuteSQLCall' , 'PGINPUT' , 'PGOUTPUT' )

 

Argument

Type

Meaning

 

Service

String

URL of the web service

 

'ExecuteSQLCall'

String

Command constant

 

'PGINPUT'

String

Name of the ePOS parameter group with the search criteria.

 

'PGOUTPUT'

String

Name of the ePOS parameter group with the result data.

Result:

Integer

Status of the function:

1 : the service function was successfully called

-1 : the component eposvbcomexe could not be found

-2 : function URL not entered

-4 : general error

Example:

B7Service = 'http://b7demo.sagebaeurer.de/br71/callin/epos_soap'sagesql.statement = 'select identnr,objektid,me from g000 where identnr like \'11%\''sagesql.namen = 'identnr,objektid,me'Status = f$SageService ( B7Service , 'ExecuteSqlCall' , 'sagesql' , 'art_erg' )p$anzeige_ergebnis('art_erg' )

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.