Get_server_info

Internφ programovacφ jazykC/C++Pascal

function Get_server_info(info_type : integer; var buffer; buffer_size : integer) : Boolean;
BOOL WINAPI [cd_]Get_server_info(cdp_t cdp, int info_type, void * buffer, unsigned buffer_size);
function [cd_]Get_server_info(cdp : cdp_t; info_type : integer; var buffer; buffer_size : integer) : Boolean;

Parametry

info_type Φφslo po₧adovanΘ informace
buffer prom∞nnß pro vrßcenφ dat
buffer_size velikost prostoru v buffer v bajtech
cdp kontextovß prom∞nnß klienta

Od verze

7.0

Hodnota funkce

Funkce vracφ FALSE v p°φpad∞ ·sp∞chu, TRUE p°i chyb∞.

Popis

Funkce zφskß z SQL serveru informaci oznaΦenou parametrem info_type a zapφÜe ji do prom∞nnΘ buffer. Je-li buffer_size p°φliÜ malΘ na po₧adovanou informaci, dojde k chyb∞.

P°φklad:

pou₧itφ ve vnit°nφm jazyce:

var
 res : integer;
 ress : string[10];
begin
  Get_server_info(0,res,4);
  case res of
   0 : ress := "Windows";
   2 : ress := "Linux";
  end;
  Info_box("platforma SQL serveru",ress)
end.

Pou₧itφ v SQL procedu°e:

PROCEDURE `PLATFORM`(  );
BEGIN
  IF @@PLATFORM = 0 THEN
    CALL Log_write("Windows");
    // volßnφ procedury pro Windows
  ELSE
    CALL Log_write("Linux");
    // volßnφ odliÜnΘ procedury pro Linux
  END IF;
END

Viz