Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
Runtime dataset creation - 2.06 |
Wed, Apr 11 2018 3:52 PM | Permanent Link |
Huseyin Aliz myBiss ApS | Hi All,
I am in process of migrating from 2.04 to 2.06, and have left 2 issues, one with creating a dataset runtime. Following from 2.04:   XXdataset:=TDataSet.Create(nil);   with XXdataset.Columns.Add do   begin   Name:='Item';   DataType:=dtString;   Length:=25;   end;   with XXdataset do begin   OnRowChanged := XXdatasetRowChanged;   Open;   end; XXdataset:=TDataSet.Create(nil) makes it global, but how can I use it in the new setup with named database? I have defined XXDatabase in database unit, but i cannot simply do XXdataset:=TDataSet.Create(XXDatabase); and tried other options (create dataset on oncreate event of xxdatabase etc), i am obviously doing something wrong, but what? Thanks in advance. Regards, Hüseyin |
Thu, Apr 12 2018 3:25 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Hüseyin,
<< I am in process of migrating from 2.04 to 2.06, and have left 2 issues, one with creating a dataset runtime. XXdataset:=TDataSet.Create(nil) makes it global, but how can I use it in the new setup with named database? I have defined XXDatabase in database unit, but i cannot simply do XXdataset:=TDataSet.Create(XXDatabase); >> You *must* create each dataset with the owning database passed as the Owner parameter, otherwise the dataset won't be hooked up to the proper database. Tim Young Elevate Software www.elevatesoft.com |
Thu, Apr 12 2018 3:35 PM | Permanent Link |
Huseyin Aliz myBiss ApS | Hi Tim,
Thanks for the reply, i have tried following: XXdataset:=TDataSet.Create(XXDatabase); XXdataset:=TDataSet.Create('XXDatabase'); XXdataset:=TDataSet.Create(TXXDatabase); XXdataset:=TDataSet.Create(databaseunit.XXDatabase); XXdataset:=TDataSet.Create(databaseunit.'XXDatabase'); XXdataset:=TDataSet.Create(databaseunit.'TXXDatabase'); i cannot satisfy the compiler Regards, Hüseyin Den 12-04-2018 kl. 21:25 skrev Tim Young [Elevate Software]: > Hüseyin, > > << I am in process of migrating from 2.04 to 2.06, and have left 2 issues, one with creating a dataset runtime. > > XXdataset:=TDataSet.Create(nil) makes it global, but how can I use it in the new setup with named database? > > I have defined XXDatabase in database unit, but i cannot simply do XXdataset:=TDataSet.Create(XXDatabase); >> > > You *must* create each dataset with the owning database passed as the Owner parameter, otherwise the dataset won't be hooked up to the proper database. > > Tim Young > Elevate Software > www.elevatesoft.com > |
Mon, Apr 16 2018 10:26 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Hüseyin,
<< i cannot satisfy the compiler >> What's the compiler error message ? It should *tell* you exactly what the issue is. Tim Young Elevate Software www.elevatesoft.com |
Mon, Apr 16 2018 6:38 PM | Permanent Link |
Huseyin Aliz myBiss ApS | Tim,
This seems to be working now also, strange because i think i've tried following before and without success but now it compiles and run fine: xxruntime :=TDataSet.Create(myDatabase); myDatabase are defined as TDatabase within database unit. I must have missed something before or added something while troubleshooting which makes it work now. Regards, Hüseyin Den 16-04-2018 kl. 16:26 skrev Tim Young [Elevate Software]: > Hüseyin, > > << i cannot satisfy the compiler >> > > What's the compiler error message ? It should *tell* you exactly what the issue is. > > Tim Young > Elevate Software > www.elevatesoft.com > |
This web page was last updated on Tuesday, September 17, 2024 at 06:44 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |