Is access to TDAMemDataTable objects threadsafe? I am specifically enquiring about within a service implementation. I have assumed that access from here is going to be fine as it is all run by RO code.
But if I create a new thread on the server, I may access the database tables from there as well.
I am not very familiar with datatables and datasources etc. I am used to straight sql and php.
If I have two threads on the server that are trying to access the same table, do I have to do anything special? For example, thread A opens a TROMemDataTAble and reads a list of records. Then thread B does the same before A closes it. Will the data opened by the two threads get mixed up?
This is where I get confused. Should I be opening a dataset? I have done that from the Connection and Schema but I am still not convinced I am going about it the correct way.
The method I am using for the dataset requires an ‘sql’ where part. Is this where specific to the end database I am using (mssql) or is it automatically converted. If so is there a document defining the DA sql standard?
Are there any special considerations when multiple threads on the server are access database resources or sending events to an Event Repository?
I have written a table editing form using a DBGrid. The This is opened for editing and it uses the DBGrid.DataSource is set to ServerDataModule.ds_mytable (a datasource created by the LocalDataConnectors create table wizard).
Whilst I am editing the database, what happens if someone access the data service and requests data from the same table or makes changes.
The DBGrid is using the same object as the DataService. Is this a problem?
I had the edit form open with a dbLookupComboEdit using one of the tables.
After selecting somthing in the combobox, I made a service request from a client that used the same table. The combobox went blank when this service request was performed by the server.
I had created the application using the Wizard. I chose the option that created a combined Server/Client (i think this is what it was called) where the App had a dataservice as well as locate datatables.
I am guessing these local data tables (that use the local adaptor) can only be used in a service.
My solution which looks like it is working it to create duplicate datatables and datasources for the tables I need to edit with the GUI. This looks ok, but I dont think it is ideal.
Is this the best/only way to have two simultaneously open connections?
I have been created IDataSets from a new Connection as well. If I create multiple IDataSets from the same table, will they clash or do they have their own ‘local’ data.