cancel
Showing results for 
Search instead for 
Did you mean: 

Limits to SQL Statements in sacapi.dll

Former Member
2,782

Hi all, just wanting to know, are there any upper limits with respects to the size/complexity of a SQL Statement executed against SqlAnywhere 12 through the sacapi.dll?

The kinds of things I'm looking to understand are

  • Maximum character length (I am guessing this would be bounded by the maximum string length in SA, i.e. 2GB), but are there further restrictions placed on this by either the engine or the dll?
  • Maximum number of prepared parameters?
  • Any other hard limits we might run into?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

I do not believe there are any specific hard limits you should run into when going through sacapi.dll, apart from the normal hard limits imposed by the server. To your specific points:

  • Maximum character length (I am guessing this would be bounded by the maximum string length in SA, i.e. 2GB), but are there further restrictions placed on this by either the engine or the dll?

INSERTING or SELECTING very large values over sacapi.dll may be very memory intensive. In particular, dealing with values > 500MB as a single block could cause low memory conditions. However, sacapi.dll has APIs for INSERTing and SELECTing chunked data. As long as the chunked APIs are used for large values, you should not have a problem.

  • Maximum number of prepared parameters?

The server's governor has some default values (such a maximum of 50 active prepared statements per connection), but none of these are specific to sacapi.dll.

  • Any other hard limits we might run into?

Nope, not that I am aware of.