Jump to content

bazzer747

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. bazzer747

    Error insight in Rio

    Yes. 10.3.1 is just as bad. Doesn't anybody in Embarcadero read these posts and think 'Ah, an issue that bugs our community, I'll get it fixed'? I guess not as it never does. Not the only thing that never seems to work in new releases. Like try 'Tutorials' and click 'See more Snippets'. A blank screen!
  2. bazzer747

    So Many fdQueries

    Hi, Many thanks for all suggestions., I done a lot more thinking of my problems and come up with the following code: procedure ConnectLiveTest( fdc: String ); var i: Integer; begin for i := 0 to dm.ComponentCount -1 do if dm.Components[ i ] is TFDQuery then begin if fdc = 'Live' then TFDQuery( dm.Components[ i ]).Connection:= dm.fdcLive1 else TFDQuery( dm.Components[ i ]).Connection:= dm.fdcTest1; TFDQuery( dm.Components[ i ]).Active := True; end; end; This allows me to quickly switch between Test and Live MSSQL Server databases. And (whilst I'm still testing) appears to work OK.
  3. bazzer747

    So Many fdQueries

    FDSQL - sorry, shorthand! Meant FDConnection1.ExecSQL (see http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Executing_Commands_(FireDAC)). Thanks for tips here, I'll certainly look into both (Good job Chrome can translate pages :-)).
  4. bazzer747

    So Many fdQueries

    In my application I have a Data Module which has 2 FD Connections (one for Test site one for Live site) and over 20 FDQueries for all the tables and views (I connect to MS SQL Servers). My application fails quite regularly with error saying cannot access a closed dataset, and I think it is because at some stage I've used ExecSQL to insert or update a record and this appears to change the query in the FDQ. Which means I'm having to re-specify the sql query in code several times throughout the application. It seems to me that this isn't very good coding/design. I can't use the FDCExecSQL command as I'm flipping between the Test and Live connections, again I feel this isn't the right way to do this. If anybody can suggest a better way to manage my connectivity to avoid having to re-specify queries I would be very grateful.
×