#1 2013-02-19 12:31:47

ManUn
Member
Registered: 2013-02-04
Posts: 22

Too many : ( ) : params

I'm trying to insert a object into a table and I get this error from the server:
"Too many : ( ) : params".

The table(class) that I'm trying to insert has 65 fields (published properties).

What could be the cause of this error?

Last edited by ManUn (2013-02-19 12:45:54)

Offline

#2 2013-02-19 12:53:11

Leander007
Member
From: Slovenia
Registered: 2011-04-29
Posts: 113

Re: Too many : ( ) : params

At SynCommons.pas you have

MAX_SQLFIELDS = 64;

Change this value according to this text:

MAX_SQLFIELDS default is still 64, but can now be set to any value (64,
128, 192 and 256 have optimized fast code) so that you can have any number
of fields in a Table

"Uncertainty in science: There no doubt exist natural laws, but once this fine reason of ours was corrupted, it corrupted everything.", Blaise Pascal

Offline

#3 2013-02-19 13:15:49

ManUn
Member
Registered: 2013-02-04
Posts: 22

Re: Too many : ( ) : params

Thank you for the answer, but, this is already in 128. Even If I change to 256 the error continues.

function ExtractInlineParameters(const SQL: RawUTF8;
  var Types: TSQLParamTypeDynArray; var Values: TRawUTF8DynArray;
  var maxParam: integer; var Nulls: TSQLFieldBits): RawUTF8;
var ppBeg: integer;
    P, Gen: PUTF8Char;
    wasNull: boolean;
begin
  (...)
    if maxParam>high(Types) then
      raise ESynException.Create('Too many :(): params');  //<--- error occurs here
  (...)
end;

Last edited by ManUn (2013-02-19 13:18:48)

Offline

#4 2013-02-19 14:13:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,205
Website

Re: Too many : ( ) : params

This limitation should be removed now.
You can delete the whole check, since the Types[] array is now a dynamic array, resized within the internal loop.

See http://synopse.info/fossil/info/a0d92dfc7d

Offline

#5 2013-02-19 14:27:31

ManUn
Member
Registered: 2013-02-04
Posts: 22

Re: Too many : ( ) : params

Beautiful, thanks!! smile

Offline

Board footer

Powered by FluxBB