Skip to content

Instantly share code, notes, and snippets.

@jerstlouis
Created March 18, 2015 05:00
Show Gist options
  • Save jerstlouis/9837874fde5f4c7e15f4 to your computer and use it in GitHub Desktop.
Save jerstlouis/9837874fde5f4c7e15f4 to your computer and use it in GitHub Desktop.
unsigned int OnReceive(const unsigned char * buffer, unsigned int count)
{
String s = RSearchString(buffer, "</Rows>", count, false, true);
if(s)
{
int len = s - buffer + 7 /* sizeof("</Rows>") */;
String sql = new char[len + 1];
memcpy(sql, s, len);
sql[len] = '\0';
theForm.setSQL(sql);
delete s;
return len;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment