Invalid Variant Operation
Invalid Variant Operation
I am using Delphi 5 with latest MyDAC and DevExpress
I have a simple 2 TQuery Master Detail setup with 2 master detail DevExpress grids. All works except when i click inside the master grid from a record WITH detail records to a record WITHOUT detail records - i get Invalid Variant Operation and then keep getting this over and over.
Also my Date field in the detail record - when i click on the Date in the grid I get 'control has no parent window'
am i wondering if Date field in the detail is an issue? or could it be that the detail table is using an autoinc for the primary key and that an issue?
I have a simple 2 TQuery Master Detail setup with 2 master detail DevExpress grids. All works except when i click inside the master grid from a record WITH detail records to a record WITHOUT detail records - i get Invalid Variant Operation and then keep getting this over and over.
Also my Date field in the detail record - when i click on the Date in the grid I get 'control has no parent window'
am i wondering if Date field in the detail is an issue? or could it be that the detail table is using an autoinc for the primary key and that an issue?
-
AndreyZ
Invalid Var Oper - code added
Hello 
Yes I did reproduce with DBGrid …
See my sample project. I get this error on the insertion of the master table when there are no detail records. Invalid Variant Operation
http://www.tebowner.com/test.zip
Yes I did reproduce with DBGrid …
See my sample project. I get this error on the insertion of the master table when there are no detail records. Invalid Variant Operation
http://www.tebowner.com/test.zip
-
AndreyZ
are you using Delphi 5? I am getting the issue when I insert into the Master table and then move rows or enter data and move rows. could it be the version of My SQL? maybe certain MY SQL settings? Delphi 5 version?
I dont have any code in that sample app.
Delphi 5.0 Build 6.18 Update Pack 1- Windows 2000 (Build 2600) Service Pk 3
Mysql
* Server: localhost via TCP/IP
* Server version: 5.5.15
* Protocol version: 10
* User: root@localhost
* MySQL charset: UTF-8 Unicode (utf8)
Web server
* Apache/2.2.4 (Win32) PHP/5.2.3
* MySQL client version: 5.0.37
* PHP extension: mysql
phpMyAdmin
* Version information: 3.3.1
I dont have any code in that sample app.
Delphi 5.0 Build 6.18 Update Pack 1- Windows 2000 (Build 2600) Service Pk 3
Mysql
* Server: localhost via TCP/IP
* Server version: 5.5.15
* Protocol version: 10
* User: root@localhost
* MySQL charset: UTF-8 Unicode (utf8)
Web server
* Apache/2.2.4 (Win32) PHP/5.2.3
* MySQL client version: 5.0.37
* PHP extension: mysql
phpMyAdmin
* Version information: 3.3.1
-
AndreyZ
-
AndreyZ
It's a strange situation, because MyDAC 7.0.1 trial and licensed versions work absolutely in the same way, and there is no difference between these versions, except the fact that you cannot include MyDAC libraries from trial version into your project (you have to supply them with your project). I've checked this problem with MyDAC 7.0.1 Trial Edition and there were no problems with it.
-
AndreyZ
You can try the following:
- uninstall MyDAC and Delphi 5;
- install Delphi 5 without Update Pack 1;
- install MyDAC and check if these problems persist;
- install Update Pack 1 for Delphi 5 and check if these problems persist again.
If you can reproduce these problems both with and without Update Pack 1 for Delphi 5, please try creating a small sample to demonstrate problems and send it to andreyz*devart*com, including a script to create and fill the master and detail tables.
- uninstall MyDAC and Delphi 5;
- install Delphi 5 without Update Pack 1;
- install MyDAC and check if these problems persist;
- install Update Pack 1 for Delphi 5 and check if these problems persist again.
If you can reproduce these problems both with and without Update Pack 1 for Delphi 5, please try creating a small sample to demonstrate problems and send it to andreyz*devart*com, including a script to create and fill the master and detail tables.
OK i think i know my issue possibly - i am not sure if it effected this problem but I did solve my issue where the date fields were giving me Parent "" Control window issue.
I was opening my queries in the Form.Activate event. this event was firing when a date field opened the date window. this messed up the selected rec as the query was closed/opened
I was opening my queries in the Form.Activate event. this event was firing when a date field opened the date window. this messed up the selected rec as the query was closed/opened