SQUID Functions

 

  • The SQUID functions, and their examples, assume that the SQUID server has been started with an address of http://localhost:8000.
  • Validation of the function calls can be handled by checking the return value and calling SquidGetLastError().

 

Entries in SquidExportData (1)

Sunday
Feb192012

SquidExportData

  • Export column data to a file.
  • The data is not removed from the column in SQUID.
  • The first row of the file will contain the parameter name.
  • If the UI is being used, click the '...' to display the file save dialog.

Prototype

int SquidExportData(int iSquid, char* sParam, char* sFilePath, int iOption);

  • Parameters
iSquidSquid Connection Handle
sParamString containing the name of the column
sFilePathFile to export
iOption=0 Overwrite file
=1 Create a backup first (if file exists)
=2 If file exists, do nothing, return error
  • Return Values
0Operation successful
-1Error occurred, call SquidGetLastError for details

Example

int iSquid;
lr_load_dll("SQUID-REST.dll");
iSquid = SquidConnect("http://localhost:8000");
SquidCreateColumn(iSquid, "NewColumn");
SquidSendData(iSquid, "NewColumn", "20");
SquidSendData(iSquid, "NewColumn", "100");
SquidSendData(iSquid, "NewColumn", "50");
SquidExportData(iSquid, "NewColumn", "c:\\users_exported.dat", 1);
SquidDisconnect(iSquid);