[patch_done] How to insert TEXT data?
Moderators: gto, EgonHugeist, olehs
[patch_done] How to insert TEXT data?
Hi,
I've a problem with inserting text data (MySQL; ZEOS7; CBuilder XE).
I create a table:
CREATE table test(id int not null, txt TEXT null) Engine=InnoDB;
Next I want to insert data:
ZSQLProcessor1->Script->Text = "insert into test (id, txt) values(:id,:txt)";
ZSQLProcessor1->ParamByName("id")->AsInteger = 2;
ZSQLProcessor1->ParamByName("txt")->AsString = "test2";
ZSQLProcessor1->Execute();
Then I get error:
Project Project1.exe raised exception class EZSQLException with message 'Input parameter count is less then expected'.
What can be wrong? The cause must be in the text var, for when I omit that, all works OK.
Thanks for help
Henk
I've a problem with inserting text data (MySQL; ZEOS7; CBuilder XE).
I create a table:
CREATE table test(id int not null, txt TEXT null) Engine=InnoDB;
Next I want to insert data:
ZSQLProcessor1->Script->Text = "insert into test (id, txt) values(:id,:txt)";
ZSQLProcessor1->ParamByName("id")->AsInteger = 2;
ZSQLProcessor1->ParamByName("txt")->AsString = "test2";
ZSQLProcessor1->Execute();
Then I get error:
Project Project1.exe raised exception class EZSQLException with message 'Input parameter count is less then expected'.
What can be wrong? The cause must be in the text var, for when I omit that, all works OK.
Thanks for help
Henk
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
hstijnen,
i must admit don't know anything about features of Z6. So it would be a dream to keep the old functionality or not? So can you help here? Can you tell me the differences of Z6 and Z7 in code lines concerning that unsupported feature? Are you able to do that?
Michael
i must admit don't know anything about features of Z6. So it would be a dream to keep the old functionality or not? So can you help here? Can you tell me the differences of Z6 and Z7 in code lines concerning that unsupported feature? Are you able to do that?
Michael
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Egon,
I don't know anything about the code. The functionality is there, for it does work for e.g. integer, float, datetime parameters. Only when I use text there is an error.
The assignment succeeds:
ZSQLProcessor1->ParamByName("message")->AsString = rvMsg;
for when I check it:
UnicodeString rvm1=ZSQLProcessor1->ParamByName("message")->AsString;
then rvm1 gives the correct value.
Only ZSQLProcessor1->Execute() causes an error. It seems to me it must have to do with the transgression from AnsiString (Z6) to UnicodeString/WideString (Z7) and the sending of UnicodeString data to the server. That data seems not to arrive, for server says that parameter is missing.
Kind regards,
Henk
I don't know anything about the code. The functionality is there, for it does work for e.g. integer, float, datetime parameters. Only when I use text there is an error.
The assignment succeeds:
ZSQLProcessor1->ParamByName("message")->AsString = rvMsg;
for when I check it:
UnicodeString rvm1=ZSQLProcessor1->ParamByName("message")->AsString;
then rvm1 gives the correct value.
Only ZSQLProcessor1->Execute() causes an error. It seems to me it must have to do with the transgression from AnsiString (Z6) to UnicodeString/WideString (Z7) and the sending of UnicodeString data to the server. That data seems not to arrive, for server says that parameter is missing.
Kind regards,
Henk
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
hstijnen,
you're right. Here was a missing field-type for ftWideString.
Patch done r1168
It would be fine if your confirm this.
Michael
you're right. Here was a missing field-type for ftWideString.
Patch done r1168
It would be fine if your confirm this.
Michael
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
??? Can see my chages on SourceForge.Net!
1176? we are on 1171.
Can you delete your folder and reload all the stuff?
1176? we are on 1171.
Can you delete your folder and reload all the stuff?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
hstijnen,
you're XE user. So it would be fine if you also try my branch zeoslib/branches/testing-egonhugeist. But it's up to you to decide what you want.
Concerning the trunk. If you report us bugs then the fixes are first available in the testing branches. The Project-manager MDeams merges all fixes to the trunk from time to time IF the last fixes do not make trouble again. Just like your Parameter bug. This i've fixed on both testing branches. The rules of periodes concerning updating the trunk have dependencies on time periodes of the last fixed bugs. The best sign would be -> no fixes done since long times -> update the trunk -> beta! But we must actually admit that the last one isn't so easy because it was MARK and ME who fixed a lot (New Compilers, 64Bit support and so on). We've a hight rate actually over 100 patches since the last 4 mounth. The most are related to my new branch and the new compiler supports.
If you want to be up to data then my advice for you is: use the testing branches and help us to fullfill the beta state. Use TortoiseSVN to stay up to date. And help us to kill the last bugs.
Michael
you're XE user. So it would be fine if you also try my branch zeoslib/branches/testing-egonhugeist. But it's up to you to decide what you want.
Concerning the trunk. If you report us bugs then the fixes are first available in the testing branches. The Project-manager MDeams merges all fixes to the trunk from time to time IF the last fixes do not make trouble again. Just like your Parameter bug. This i've fixed on both testing branches. The rules of periodes concerning updating the trunk have dependencies on time periodes of the last fixed bugs. The best sign would be -> no fixes done since long times -> update the trunk -> beta! But we must actually admit that the last one isn't so easy because it was MARK and ME who fixed a lot (New Compilers, 64Bit support and so on). We've a hight rate actually over 100 patches since the last 4 mounth. The most are related to my new branch and the new compiler supports.
If you want to be up to data then my advice for you is: use the testing branches and help us to fullfill the beta state. Use TortoiseSVN to stay up to date. And help us to kill the last bugs.
Michael
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/