sqlca

beasscript-logo-small

Object for current sql database connection

Read every property and execute T-SQL commands, functions and procedures

 

Command

Read

Write

Description

sqlca.commit

 

x

execute sql commit command

sqlca.concat

x

 

sqlca.datetime

x

 

Return the Datetime format for current Server

sqlca.dbname

x

 

Return name from current  database

sqlca.getwithnolock

x

 

sqlca.isconnected

x

 

Return true, if database connection is active or false, if not

sqlca.result.x

x

 

sqlca.servername

x

 

Return name of current database server name

sqlca.sqlcode

x

 

Return code of last sql statement. More see select command - error handling

sqlca.sqlerrtext

x

 

Return error text of last sql statement. More see select command - error handling

sqlca.sqlerver

x

 

Return type of SQL Server. Example MS-SQL or HANA.
Note: Please use <sqlca.ishana>  to check, if this a HANA server

sqlca.getdate

x

 

Return command for Today() command: MSSQL: today(), HANA: now()

select <sqlca.today> from "BEAS_DUMMY"

sqlca.udf.<fieldname>

x

 

sqlca.uppercase

x

 

Return, if uppercase check is on (HANA=1, MSSQL: -1)

sqlca.userid

x

 

Return current user id, which connected to database

sqlca.version

x

 

Return name of database

sqlca=<all other>

 

x

execute direct this statements

example

execute myprocedure parameter1,parameter 2

sqlca=blobread=<id>

 

x

extract the file from database with this id and return Variable <sys_blobreturn> ("ok" or the errormessage) and <sys_blobfile>

or

blobread=<id>=

sqlca=blobwrite=<id>=<file>

 

x

save file with this id in the database

sql=blobwrite=<id>=<file>

or

blobwrite=<id>=<file>

sqlca=delete

 

x

execute sql delete command. More information see sqlca.select

sqlca=execute <procedure> into <variablelist>

 

x

execute the procedure and return the result in the variable list

if you work without "into" then beas return the result in "wert1",,,"wertx"

Example:

sql=execute beas_poollist '1','1','Y' into :myid

return the id from Poollist in Variable "myid"

More Info about "into" see select-command.

sqlca=function=<sqlfunction()>

 

x

create, execute and delelete a sql Function

sqlca=select

x

x

sqlca=update

 

x

execute sql  update command. More information see sqlca.select

 

More Result-Rows, Procedure

if you've more then one result-Line, then work with ue_datastorevalues

if you call a procedure then work with ue_datastorevalues