bazzer747
Members-
Content Count
189 -
Joined
-
Last visited
-
Days Won
1
Everything posted by bazzer747
-
ParnassusCoreEditor.dll AccessViolation
bazzer747 replied to bazzer747's topic in Delphi Third-Party
So I took out Bookmarks from 10.4 AND 10.3 (as it was screwed), does this means I can use GetiT to install Bookmarks in 10.3 AND 10.4 and they won't clobber each other? The 10.4 install overwrote that dll so I don't have a 10.3 version; does GetiT install the correct versions I suppose I'm asking, or do I have to do some manipulating? -
Hi I have an MSSQL update I run which looks like this: dm.fdc.ExecSQL( 'UPDATE tPGCMatches SET FirstTeeTime = :p1T, Interval = :pIn, SecondTeeStart = :p2, SecondTeeTime = :p2T WHERE ID = :pMI' ,[ c1stTeeStartTime, cInterval, c2ndTeeHole, c2ndTeeStartTime, gviMatchID ]); I have a similar command in a different project which uses the query ExecSQL to do the update (rather than the connection) but to a different named (but structurally the same) table. I've tried using the query ExecSQL as well, I usually now prefer to use the connection for these types of SQL statements. I do many updates elsewhere in my project which work fine, but this one freezes when attempting to execute. I've run the FireDac Monitor but on the line execution nothing new appears to indicate if the command is being processed. I've checked the parameters are all OK, and run the update in Management Studio (entering values instead of parameters) and it runs OK there, so the table seems OK. It's as though it's getting stuck formulating the sql command to send to MSSQL but I don't know a way to trace what is happening to make it freeze, and the format of the command looks OK. Any suggestions/possible answers would be appreciated.
-
How do I find out this 'transactioncount'?
-
An update …. although I can't explain fully why, but I now have the code updating! Although thereis only one SQL update in the process I put a TRY EXCEPT construct around the code and with a Start Transaction, so the code block now looks like this: TRY dm.fdc.StartTransaction; dm.fdc.ExecSQL( 'UPDATE tPGCMatches SET FirstTeeTime = :p1T, Interval = :pIn, SecondTeeStart = :p2, SecondTeeTime = :p2T WHERE ID = :pMI' ,[ c1stTeeStartTime, cInterval, c2ndTeeHole, c2ndTeeStartTime, gviMatchID ]); end; dm.fdc.Commit; EXCEPT on E : Exception do ShowMessage(E.ClassName+' error raised, with message : '+E.Message); END; Lo and behold the update went through. Note I haven't changed the SQL update command in any way, or any of the variable values /parameters. So, like many things in Delphi, it is a mystery. I normally use the Start Transaction construct where I am doing several SQL Updates &/or Inserts to different tables, so wouldn't normally need one around a single SQL command. The problem I have (now) with the above code id I normally have a Rollback if the transaction fails, but I'm unsure where I can put this, or even if it is needed as an error presumably won't do the Commit and will go to the EXCEPT. My lack of knowledge shows here.
-
Lars, Yes, I agree, it's not getting past pre-processing. I've double checked the values in the parameters and they all have valid values. I ran the update using just one of the parameters at a time, thinking it was one of them that was the problem, but whichever parameter was used gave the same problem. To TigerLilly, thanks for your input. I get the same behaviour from another PC, and the same when the update is going to my Live SQL Server (as well as my Test SQL Server). So all this (to me) points to the command never leaving the application. I'll look at that trace info for SQL, thanks, even if the Monitor isn't sending anything there - it will at lkeast prove nothing is getting there. Just in case it is I'm recreating the table to do some more testing, and from a new (small) application! I'll beat this problem to death … eventually!
-
ParnassusCoreEditor.dll AccessViolation
bazzer747 replied to bazzer747's topic in Delphi Third-Party
I removed it from 10.4, but same issue, so yes it's the 10.4 version (1.6) of the dll which has overwritten the one used by 10.3 (1.0 version). I've removed Bookmarks from 10.3 as well now and will leave them alone until someone in Embacadero does some proper testing before unleashing these damaging elements! Very annoying. -
Lars, Many thanks for the idea. I've done some of this already but will persist. On the SQL diagnostics, my feeling is that the Update command isn't actually getting to the SQL Server. I would have thought I would see the command going to SQL Server in the FireDac Monitor which, as I mentioned above, does nothing when I run the specific FireDac ExecSQL line. I'm definitely going to create a new small project with just this process in it, with (as you suggest) minimal fields fully checked.
-
Hi Lars, Thanks for answering. I'm pretty sure the table isn't busy. I'm the only one accessing the table (as it's not the Live Server I'm using, also this is a test system with only myself accessing any of the tables). The 'freeze' lasts forever, not for a short period. It does appear that the table is locked, but you say it would either give up or win when the lock opens. I always have to use Task Manager to kill the app eventually. I've just run it again and it's now been over 5 minutes and it's still frozen. I'm not sure I can look anywhere to see why it is hanging. There is no error message. I'm going to create a new table (same structure) and see if it happens on this one. I've tried several different Updates using different SET field value changes, to see if it was a field that is the problem, but they all fail the same way.
-
Hmmm, about time I say. Been a fraught 2 weeks!
-
wuppdi Welcome Page for Delphi 10.4?
bazzer747 replied to PeterPanettone's topic in Delphi IDE and APIs
Hi Is there an English version for this add-in? I see the website and downloads etc but the 'Translate to English' link doesn't work and my German (I'm sorry) is extremely lacking. -
Hi, My application has a series of 3 forms, one where a User views some names, a second where the User selects some of those names, and a third where the User can view the names and manipulate them. I create all the forms modally, which means when I get the 3rd form those other 2 forms are still visible but are not required any longer. But the User can only close them when he closes the 3rd form. Also, it's not very good UI for him to go through that process. What I'd like is for the 3rd form, when it is opened, to close the previous two forms. What I've tried is this code in FormActivate: var MyHandle: tHandle; begin //If you came from Select Teams then close that window ... MyHandle:= FindWindow( nil, 'Select Team' ); SendMessage( MyHandle, WM_CLOSE, 0, 0 ); Application.ProcessMessages; Which only seems to work AFTER I close the 3rd form. Is there a way to close the previous forms as soon as the 3rd form opens?
-
Hi I'm running on Delphi 10.3.3 Enterprise. After a day's coding when I close Delphi I more often than not get the attached error happening. An access violation in rtl260bpl. Would you know if this is something that should never occur, or 'just one of those things'? It doesn't affect anything, Delphi runs as well as it always has. I often have 2 instances of Delphi running as I often copy over code from one project to the next, or form objects. This always works with no problems; I did think this might be the problem but I've done some testing and it's not something that is a hard error and doesn't happen every time. Could it be the bpl is corrupted in some small way that only complains under certain conditions. Or something like this. Any thoughts would be helpful.
-
Anders, Yes, it's a small application (mind there are about 30 different forms). The 3 forms I'm talking about lead naturally from one to the other - from the main form the first form opens viewing a list of names - if there are enough names the 2nd form is selected, this 2nd form selects from those names and leads to viewing them in the 3rd form (where many other operations can be done). It would be clumsy to do the opening (and closing) from the main form, going back then forward. If it is possible to close the form you have just come from, then that seems to me to be a much more efficient and better User experience.
-
Yes, you're right. Not causing any problems, just annoying. I suppose it gives me a feeling that the application isn't as stable as it ought to be, considering the cost of it. And that other things may not be working as they should be, but I can't see them. No worries, I just thought someone may know exactly what the cause was and had a solution.
-
Sorry, don't use GExperts. Might try the MadExcept, although I'm not really that deep into Call Stacks or the like. If it can point to any bit of code that I have created that would be perfect, but if the problem is in the VCL itself or the IDE or elsewhere inside Delphi I'm not sure I can do much (maybe report it to Embarcadero).
-
Hi On a form I have a dbgrid and a radiogroup. When a User clicks on the dbgrid I read a table which updates relevant radio buttons in the radiogroup ( a Yes, Maybe, No selection). If a User clicks one of the radio buttons it fires off table updates (setting the Yes, Maybe, No fields). However, the click on the dbgrid also sets the radio buttons by reading the information on the row clicked, which in turn is firing the radiogroup onclick event, which I don't want to happen. Is there a way to 'know' what component was used when running a procedure. This way if the dbgrid was where it came from I could bypass the updates. I've used Sender several times, but this seems to only say what form I came from.
-
Dany, Works a treat - once I got my head around the logic of what goes where :-). Many thanks for the tip. Gunther, will try your method as well. Attila, this seems like another way, which would avoid the complication I got myself into, so I'll also try this. To all, many thanks.
-
Hi I have two forms, each with a dbgrid showing items from different tables. On one grid when I select a row itrow highlights and the rows showing in the grid remain unchanged, as does the location of the row I selected. Using the up/down arrows moves the selected row up/down. On the other grid when I select a row it immediately re-positions that selected row to the middle of the visible rows. Using the up/down arrows the row selected remains exactly in the vertical centre. In the properties I can't see any differences between the two dbgrids, but would really like both dbgrids to behave the same way, whichever one of the above I don't mind. Any thoughts would help.
-
Found the answer! When I click on a cell in the grid I do a LocateEx on the fields value, this changes the record pointer which is causing the selected row to reposition itself in the centre. Not sure why this is, though. However, I replaced the LocateEx with a Lookup (which doesn't alter the record pointer) and all works as it should do now.
-
Hi I have two dbgrids, one with the Default Drawing property unchecked, the other with it checked. This latter is because I need to colour certain columns according to their values. On both I have AltRowShading checked with a slightly darker row colour, which works fine. When I select a row which has the alternate colour in the former dbgrid the color changes to a light blue on which the black text is clearly visible. However, on the latter when I select an alternate row the colour changes to a dark blue and the black text is not easily visible. I can't see anywhere a way to change this dark blue to be the same on both dbgrids, and the only difference in all the properties is the latter has default drawing checked. Any thoughts would help.
-
Hi, I'm using a FireDac query to select different sets of data in an MSSQL database. I open the first query like this: dm.fdq.Open('SELECT * FROM tblUsers WHERE MSL = :pMG ORDER BY Sname, Fname',[ 1 ] ); which works fine. I then need to select a different set of records so I issue this (assuming this replaces the above statement): dm.fdq.Open('SELECT DISTINCT Fullname, Fname FROM vPGCEnrolments WHERE MatchGroup = :pMG AND MatchYear = :pY AND YES = 1',[ gvMatchGroup, gvYear ]); This works but I start to get Access violation error messages. The select works fine though, as the correct data displays. As I think this has something to do with the select statement I issue the following statement at the end of this procedure: dm.fdq.SQL.Clear; .. but when I look at the SQL string with ShowMessage( dm.SQL.text ); it still shows the Select Distinct line shown above. The Clear statement doesn't seem to clear anything. I've saved the SQL (assigning dm.fdq.SQL.text to a variable: cSQL, at the start of the procedure), and at the end of the procedure restore with dm.fdq.SQL.Add( cSQL ); but this does nothing either. I've a feeling I'm not understanding how the above should work correctly. Any advice would be appreciated.
-
Many thanks for your help. I've now used the temporary query setup and it works a treat, no errors or glitches. Live and learn 🙂
-
Ah, thankyou for the post. I've learnt using FireDac mainly from youtube and the like, so no formal training. Trial and error a lot of the time, eventually that gets me there. The temp connection route you mentioned seems like a definite way. So a 'close' on the query does what exactly (in terms of any SQL code in the query)?
-
Hi, I have searched for 'simple' stuff in using FireDac but havn't found the answer to the following, which would save me lots of keying ... I have a datamodule with a fdQuery & Datasource, and the fdQuery has the following: 'Select * from tTable where Company = :pC order by oOrderName' - so a parameter is created in the query. If in my code I want to set the query to different values do I have to do the select statement again in it's entirety, like: dm.fdc.Open( 'Select * from tTable where Company = :pC order by oOrderName', [ 'Debenhams'] ); Or can I simply specify the new parameter value like: dm.fdc.Open( '', [ 'Woolworths' );
-
Many thanks, both - I will certainly use these methods. The shorter version Serge mentioned I saw in a YouTube on Tips & Tricks by Dmitry Arefiev CodeRage 9.