MyDAC components on a Datamodule in a Multi-Device Application
Posted: Tue 22 Aug 2017 06:44
Hi,
Hopefully you can help me, maybe I am doing something wrong here!
I create a new Multi-Device Application, select Tabbed with Navigation in RAD Studio Tokyo 10.2.
I add an Edit box on the first page and then add a datamodule. On the datamodule I add a function that returns a string. On the first page I call the function in the datamodule and display the result string in the Edit box. So far so good.
I add a TMyConnection to the datamodule and simply set the parameters, Server, Username, Password and database. I do not try an connect or do anything else with this component, just set those 4 parameters.
I leave the result as a simple string and add a try except returning the E.Message as the string if it excepts.
It excepts every time with an Access violation. I can have the TMyConnection on the datamodule as long as I do nothing with it, as soon as I try to do anything with the TMyConnection I get the Access Violation.
Is this expected? Why?
Is there anything other information I can provide?
Hopefully you can help me, maybe I am doing something wrong here!
I create a new Multi-Device Application, select Tabbed with Navigation in RAD Studio Tokyo 10.2.
I add an Edit box on the first page and then add a datamodule. On the datamodule I add a function that returns a string. On the first page I call the function in the datamodule and display the result string in the Edit box. So far so good.
I add a TMyConnection to the datamodule and simply set the parameters, Server, Username, Password and database. I do not try an connect or do anything else with this component, just set those 4 parameters.
I leave the result as a simple string and add a try except returning the E.Message as the string if it excepts.
It excepts every time with an Access violation. I can have the TMyConnection on the datamodule as long as I do nothing with it, as soon as I try to do anything with the TMyConnection I get the Access Violation.
Is this expected? Why?
Is there anything other information I can provide?