hendrang Posted May 9, 2013 Posted May 9, 2013 Hello all, Please help. I am using Anydac component (TAdConnection and TADquery) Unigui 0.93.0.996 TADConnection is put in MainModule TADQuery and Tdatasource is put in MainForm. TADQuery is set active to True at design time. (cause exception error in webmode) the program works in VCL mode. But it raise an exception error if the program is run in WebMode. the problem is solved if TADQuery is set Active to False and set to true at runntime. But I prefer TADQuery is active at design time. How can I solve the problem ? Thanks Hendra Quote
Administrators Farshad Mohajeri Posted May 9, 2013 Administrators Posted May 9, 2013 Send a bug report with test case please. Quote
Freezer Posted May 10, 2013 Posted May 10, 2013 If you don't want to wait a bugfix: easy way to solve it - open your Query OnFormCreate, or OnFormShow)). Quote
hendrang Posted May 12, 2013 Author Posted May 12, 2013 If you don't want to wait a bugfix: easy way to solve it - open your Query OnFormCreate, or OnFormShow)). Yes, thanks. actually it also occurs in desktop application. to solve this in desktop application, I manually change the create order of the data module - and set it to be the first form that gets created by the application. Auto-creat forms : Datamodule --> arrange the datamodule to be created first before mainform Mainform Quote
hendrang Posted May 13, 2013 Author Posted May 13, 2013 If you don't want to wait a bugfix: easy way to solve it - open your Query OnFormCreate, or OnFormShow)). set the dataset connection property in onbeforeopen event can solve the problem code procedure TMainForm.qryTable1BeforeOpen(DataSet: TDataSet); begin if TADQuery(DataSet).Connection = Nil then TADQuery(Dataset).Connection:= UniMainModule.ADConnection1; end; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.