Search found 65 matches

by klchin
20.06.2011, 09:24
Forum: Firebird
Topic: Blob stream out of memory.
Replies: 2
Views: 1459

Hi!

Why you insert a BLOB with that high capacity?
by klchin
09.09.2010, 04:38
Forum: SQLite
Topic: [patch_done] Very slowly post data (BLOB)
Replies: 12
Views: 2529

Then the code will be SetLength( Result,3 + SrcLength * 2 ); Result[1] := 'x'; // set x Result[2] := ''''; // set Open Quote ihx := 3; // set 1st hex location for I := 1 to SrcLength do begin shx := IntToHex( ord(SrcBuffer^),2 ); // '3E' result[ihx] := shx[1]; Inc( ihx,1 ); // copy '3' result[ihx] :...
by klchin
06.09.2010, 03:55
Forum: SQLite
Topic: [patch_done] Very slowly post data (BLOB)
Replies: 12
Views: 2529

Hi Mark,

I think I make a mistake, the code should be

result[ihx] := shx[2]; Inc( ihx,1 ); // Hi Byte
result[ihx] := shx[1]; Inc( ihx,1 ); // Lo Byte

BTW, what is QuotedStr do? Convert ABC to 'ABC' or none?

Regards,
KL Chin
by klchin
04.09.2010, 05:15
Forum: SQLite
Topic: [patch_done] Very slowly post data (BLOB)
Replies: 12
Views: 2529

Hi Mark, Unless the PAsniChar was not "1 BYTE", otherwise should be ok, i think. or use SrcBuffer : PChar or PByte instead; Hi guidoaerts, because i started from 0 result[1] := 'x'; result[2+i*2] := shx[1]; result[3+i*2] := shx[2]; Btw, not using I*2 for performance, unless compiler full o...
by klchin
02.09.2010, 03:24
Forum: SQLite
Topic: [patch_done] Very slowly post data (BLOB)
Replies: 12
Views: 2529

Hi Mark, Here the code, I had not tested. Pls. veify it. function NewEncodeString( Value : ansistring ) : ansistring; var I : Integer; SrcLength : Integer; // ,DestLength SrcBuffer : PAnsiChar; // , DestBuffer ihx : integer; // IH, shx : ansistring; begin SrcLength := Length(Value); // SrcBuffer := ...
by klchin
30.08.2010, 08:52
Forum: SQLite
Topic: [patch_done] Very slowly post data (BLOB)
Replies: 12
Views: 2529

Hi, I think the slow was due to result := result + IntToHex(IH,2); <-- slow process Why not try to convert to a small string and do a mem copy ie. SetLength( Result,Length(SrcData) * 2 ); nchr := 1; ... tmp := IntToHex(IH,2); Result[nchr] := tmp[1]; Result[nchr + 1] := tmp[2]; nchr := nchr + 2; ... ...
by klchin
03.05.2010, 04:33
Forum: ZeosLib 7.0 Beta Forum
Topic: Newbie - Zeos, Firebird and Autoinc Question
Replies: 1
Views: 330

Hi btray77,

AutoInc field will depend on SQL server not zeos.
by klchin
25.03.2010, 04:38
Forum: 6.6 - stable
Topic: How use locate with more than one field ?
Replies: 4
Views: 3222

Sorry, wong info

Regards,
KL Chin
by klchin
17.12.2009, 08:37
Forum: 6.6 - stable
Topic: execSQL with POSTGRESQL
Replies: 4
Views: 707

Hi,

I think you using the wrong command,

ZQuery1->Close();
ZQuery1->SQL->Text = "INSERT INTO cars(model) VALUES('A3');";
ZQuery1->Open(); <-- sohuld be ZQuery1->ExecSQL( );

Regards,
KL Chin
by klchin
30.10.2009, 03:27
Forum: 6.6 - stable
Topic: TZAbstractRODataset.InternalLocate problem
Replies: 0
Views: 471

TZAbstractRODataset.InternalLocate problem

Hi, Could this a bug or limitation or compatible issue between 6.6x and 6.1x. Here the table structure --------------------------------------------- CREATE TABLE `ctsstkotmst` ( `somRnID` BIGINT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `somDtTm` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `somPsID...
by klchin
30.10.2009, 03:20
Forum: 6.6 - stable
Topic: TZAbstractRODataset.InternalLocate problem
Replies: 1
Views: 310

TZAbstractRODataset.InternalLocate problem

Hi, Could this a bug or limitation or compatible issue between 6.6x and 6.1x. Here the table structure --------------------------------------------- CREATE TABLE `ctsstkotmst` ( `somRnID` BIGINT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `somDtTm` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `somPsID...
by klchin
25.09.2009, 02:36
Forum: 6.6 - stable
Topic: Grave performance issue
Replies: 8
Views: 1455

Hi,

If you wanted to deal with alot of String operation,
why not try to use fixed or allocated char array
to concatenate the string.
by klchin
24.09.2009, 03:42
Forum: 6.6 - stable
Topic: Grave performance issue
Replies: 8
Views: 1455

Hi,

Possible slowdown could be cause by the "String" operation,
s := s + FDataSet.FieldByName('ID').AsString;

How about the speed if you just assigning the Stirng,
s := FDataSet.FieldByName('ID').AsString;
I think this should give you more accurate speed test.
by klchin
07.09.2009, 10:33
Forum: 6.6 - stable
Topic: Zeos stored procedure "parameter mismatch" errors
Replies: 7
Views: 956

Hi,

It might due to the date format, like
yyyy/mm/dd or dd/mm/yyyy.

The main reason I suggest to use 2001/01/01, is to
find out the problem really due to date format or not.
by klchin
07.09.2009, 09:22
Forum: 6.6 - stable
Topic: Zeos stored procedure "parameter mismatch" errors
Replies: 7
Views: 956

Hi,

Why not try to use DateToStr( EncodeDate(2001, 01, 01) ) to
find out the format needed by firebird.