256 byte string limit?

 

Hi,

Just wrapping up a script which sends tick data to MySQL database. Successful, but when I went to add some more variables in the string I got the compile error:

'(time_posix INT UNSIGNED NOT NULL, th INT UNSIGNED NOT NULL, dow INT UNSIGNED NOT NULL, date_time VARCHAR(40) NOT NULL, date VARCHAR(10) NOT NULL, time VARCHAR(10) NOT NULL, tick INT UNSIGNED NOT NULL, bid DOUBLE NOT NULL, ask DOUBLE NOT NULL, spread DOUB' - too long string (255 characters maximum allowed) C:\_FX\brokerMT4\experts\scripts\MBSQL_EMAv1.mq4 (109, 13)

Is there a workaround for this problem? Concatenation possibly? 256 bytes not a lot to work with.....

The MySQL "UNSIGNED NOT NULL" for each var takes up a LOT of that 255 limit. Ideally, I have another 20 variables to add, mostly Doubles.

I'd greatly appreciate some solution....

Best regards,

Merlin

 

What is this BS

(time_posix INT UNSIGNED NOT NULL, th INT UNSIGNED NOT NULL, dow INT UNSIGNED NOT NULL, date_time VARCHAR(40) NOT NULL, date VARCHAR(10) NOT NULL, time VARCHAR(10) NOT NULL, tick INT UNSIGNED NOT NULL, bid DOUBLE NOT NULL, ask DOUBLE NOT NULL, spread DOU

That's not valid mql4 code.

The maximum literal string size is 255, for larger you must concatenate.

 
WHRoeder:

What is this BS

That's not valid mql4 code.

The maximum literal string size is 255, for larger you must concatenate.


Thanks. Last line was helpful. The error portion I sent was not MQL4 code, but it was the last part of the MT4 Compile Error statement. It's part of the MySQL Insert code which puts each tick, etc., into the database.
Reason: