I am using Delphi 10.2.2, SQLite3, PostgreSQL 10.1 64bit on Windows 64bit, Delphi project targeting Win32 platform.
I have following SQLite table:
Code: Select all
CREATE TABLE replies (
autoinc integer not null primary key autoincrement,
year smallint,
month smallint,
turu smallint,
emailid uuid,
reply text,
createtime timestamp,
ip text );
Code: Select all
CREATE TABLE if not exists cevaplar (
autoinc serial not null primary key,
yil smallint,
ay smallint,
turu smallint,
emailid uuid,
verilencevap boolean,
cevapzamani timestamp(0) without time zone,
cevapverenipnumarasi cidr,
kaydeden varchar(20),
kayitzamani timestamp(0) without time zone );
Code: Select all
select year as yil, month as ay, turu, emailid, reply as verilencevap, createtime as cevapzamani, ip as cevapverenipnumarasi, :kaydeden as kaydeden, :kayitzamani as kayitzamani
from replies
Code: Select all
UniQuery1.ParamByName('kaydeden').AsString := 'AUTO';
UniQuery1.ParamByName('kayitzamani').AsDateTime := Now();
Code: Select all
UniQuery1.Open();
UniLoader1.LoadFromDataSet(UniQuery1);
1) EVariantBadVarTypeError: "Invalid variant type" (this error can only seen if project is running in debug mode in Delphi IDE)
2) EPgError: "insufficient data left in message"
Raw data in SQLite3 table is just 10 rows and as following:
Code: Select all
"1" "1" "2018" "1" "0" "{8FF9F31A-8BCF-407F-AADA-1010BD54660A}" "TRUE" "2018-01-03 01:28:19.000" ""
"2" "2" "2018" "1" "0" "{0F5EF1D4-B407-4B58-A276-A42D948980BD}" "TRUE" "2018-01-03 01:28:53.000" ""
"3" "3" "2018" "1" "0" "{74A5BFD9-D740-42E5-BAE1-E9A9E589C609}" "TRUE" "2018-01-03 01:29:05.000" ""
"4" "4" "2018" "1" "0" "{74A5BFD9-D740-42E5-BAE1-E9A9E589C609}" "FALSE" "2018-01-03 01:30:26.000" ""
"5" "5" "2018" "1" "0" "{8FF9F31A-8BCF-407F-AADA-1010BD54660A}" "TRUE" "2018-01-03 02:11:42.000" ""
"6" "6" "2018" "1" "0" "{74A5BFD9-D740-42E5-BAE1-E9A9E589C609}" "FALSE" "2018-01-03 02:12:18.000" ""
"7" "7" "2018" "1" "0" "{74A5BFD9-D740-42E5-BAE1-E9A9E589C609}" "FALSE" "2018-01-03 13:17:15.000" "94.122.19.189/32"
"8" "8" "2018" "1" "0" "{74A5BFD9-D740-42E5-BAE1-E9A9E589C609}" "FALSE" "2018-01-03 13:17:22.000" "94.122.19.189/32"
"9" "9" "2018" "1" "0" "{74A5BFD9-D740-42E5-BAE1-E9A9E589C609}" "FALSE" "2018-01-03 13:17:25.000" "94.122.19.189/32"
"10" "10" "2018" "1" "0" "{74A5BFD9-D740-42E5-BAE1-E9A9E589C609}" "TRUE" "2018-01-03 13:17:27.000" "94.122.19.189/32"
A- Make all rows null for "ip" column in SQLite3 table (just for test, I cannot remove that column in my data transfer)
B- Created reply column using "reply boolean" in the SQL. When filling in data, assigned values using ".AsBoolean" and values appeared as "Y" and "N" in the column.
C- Used above provided SQLite create SQL and modified "Y" for true and "N" for false manually the reply column in SQLite3 table
All above failed and I could not identify which column has problem.
Lastly, after error there is following memory leak:
Code: Select all
21 - 28 bytes: TCompressedBlobData x 4, Unknown x 1
29 - 36 bytes: TCompressedBlob x 4
37 - 44 bytes: Unknown x 1
53 - 60 bytes: Unknown x 1
I appreciate to know if there is something I can do as a workaround as I am stuck at last stage of my project that should be complete by the end of this week.
Thanks & regards,
Ertan Küçükoğlu