Sunday
Feb192012
SquidSendDataIfUnique
- Sends data into a column in SQUID, provided that the value does not already exist.
- If the column does not exist, it will be created and the data will be added.
Prototype
int SquidSendDataIfUnique(int iSquid, char* sParam, char* sData);
- Parameters
iSquid Squid Connection Handle sParam String containing the name of the column sData Data to send to the column
- Return Values
0 Operation successful -1 Error occurred, call SquidGetLastError for details
Example
char sBuf[100];
int iRandom;
int i;
int iSquid;
lr_load_dll("SQUID-REST.dll");
iSquid = SquidConnect("http://localhost:8000");
srand(time(NULL));
for (i=1; i<= 100; i++)
{
iRandom = (rand() % 100) + 1;
sprintf(sBuf, "LR-%05d", iRandom);
SquidSendDataIfUnique(iSquid, "NewColumn", sBuf);
}
SquidDisconnect(iSquid);