Jump to content

PenelopeSkye

Members
  • Content Count

    69
  • Joined

  • Last visited

Everything posted by PenelopeSkye

  1. PenelopeSkye

    Must have multiple var sections

    Since you are kind enough to look into getting values from an array this is what I have so far. I can get the 2 values I want n each pass of the loop, but I want to be able to put both values together in a sentence and display them in a memo box. You were kind enough to provide code but will it work if I use the code below to get the both values into a sentence since it is already set up and the code above makes my brain hurt? I wish I were more experienced! Thanks! procedure TfDesignMaster.PopulatePdlNotesWithValuePack(Sender: TObject); begin //var designid: string; var stocknummm: string; var F: TField; stocknummm := dm.tb_design_master.fieldbyname('jmc_stock_num').asstring; ShowMessage(stocknummm); with dm do Begin q_GetStockNumFromValuePackLinks.SQL.Clear; q_GetStockNumFromValuePackLinks.SQL.Add('select Stock_pack,Qty1 from ValuePackLinks where Pack_component1 = '+stocknummm) ; q_GetStockNumFromValuePackLinks.Open; while not q_GetStockNumFromValuePackLinks.EOF do begin for F in q_GetStockNumFromValuePackLinks.Fields do begin ShowMessage(F.Value); q_GetStockNumFromValuePackLinks.Next; end; q_GetStockNumFromValuePackLinks.Close; end; End; end;
  2. PenelopeSkye

    Must have multiple var sections

    FYI I am trying to get the values from a query into an array. I am trying a lot of stuff cause I am not sure how I do it, hence all the variables! I will get rid of a lot of them once I figure out how to do this!
  3. PenelopeSkye

    Must have multiple var sections

    Oh my gosh, thank you so much!!! I combined your suggestions together and I am set!!
  4. PenelopeSkye

    Move objects to a second Data Module

    I have a Data Module where it is impossible to find objects, see attached screenshot. I inherited it in this state. I just have to scroll through the objects in the structure pane to find anything. I would like to create a second Data Module file and move some of the database objects that I work with most frequently. Does anyone have any instructions to do this? I would love to start cutting and pasting but I am quite sure it can't be that simple! Thanks!
  5. PenelopeSkye

    Move objects to a second Data Module

    I am definitely not fond of the data module. And I am also concerned about all the various places these objects are referred to. It has been a learning process!
  6. PenelopeSkye

    Move objects to a second Data Module

    Thank you weirdo!
  7. PenelopeSkye

    Move objects to a second Data Module

    As I read each successive text I would think - I'll try that! Then the next Idea was also good! I'm going to try Programmers code. I am not the most experienced Pascal developer so I may not be able to make it work. If I can't I will clone the current data module but also see if I can easily create the objects at run-time. If I can ever build it from the ground up it will be in C#!!!! Thanks again everyone!
  8. PenelopeSkye

    Move objects to a second Data Module

    Thank you everyone! I am going to just start moving one object at a time as I work with them, find out where it is used and act accordingly.
  9. I want to capture the before and after values for specific dbedit boxes in an app I am working on (The point is to capture the user who makes the change and track the changes they are making). I have written 2 procedures, one that inserts the text value before the field is updated and one that inserts the text value after the field is updated I am using OnMouseEnter and OnExit events respectively to do so. The AddUserbefore insert works fine (It is the same code except it captures OldValue instead of NewValue). The AddUserAfter insert works fine as long as the user places the cursor in another field before shutting down the app But if they update the value in the edit box and then shut down the app without placing the cursor in another field first then either the NewValue doesn't show up in the db, or the updated value shows up in the OldValue field. I tried adding the post first but it didn't change anything. What am I doing wrong? Thank you! ############################################################ procedure TfDesignMaster.AddUserAfter(Sender: TObject); var CommandText,userstring,NewValue,qstring: string; TimeOfChange : TDateTime; begin if (dm.tb_design_master.state=dsEdit) or (dm.tb_design_master.state=dsInsert) then dm.tb_design_master.post else ShowMessage('Not open'); with dm do begin userstring := CurrentUserName; NewValue := dbedit13.text; TimeOfChange := VarToDateTime(Now); qString := 'INSERT INTO AdimsUserField (JM_User,NewValue,TimeOfChange) VALUES (:a, :b,:c)'; commandAddUser.CommandText := qstring; commandAddUser.Parameters.FindParam('a').Value := userstring; commandAddUser.Parameters.FindParam('b').Value := NewValue; commandAddUser.Parameters.FindParam('c').Value := TimeOfChange; commandAddUser.Execute(); //ShowMessage(userstring); end; end;
  10. PenelopeSkye

    Trying to find the correct mouse event

    I'm so sorry, I could have sworn I replied to this! I used On Enter and that did the trick, of course it seems obvious in retrospect! Thank you!
  11. PenelopeSkye

    Search unit with db objects

    I have inherited a data unit with hundreds of objects and I can't find what I am looking for. Is there any way to search for the object I am looking for? Thanks! Please let me know the correct way to refer to this file and I will update the title. There has got to be a better way than 'data unit' or 'unit with db objects'! Thanks!
  12. PenelopeSkye

    Search unit with db objects

    Thank you so much!! Now I can see the query string being used!!!
  13. PenelopeSkye

    Missing CommandText property

    I am trying to insert into a database. I am using the code below. When I run the code I get the error message also below. It is my understanding that the command text is only if you are using a sql statement which I am not. What am I missing? Thanks! procedure TfDesignMaster.btnAddUserClick(Sender: TObject); var userstring,OldValue: string; begin with dm do begin userstring := CurrentUserName; OldValue := dbedit23.text; dsetAddUser.Open; tbAddUser.Insert; tbAddUser['JM_User'] := userstring; tbAddUser['OldValue'] := DBEdit23.Text; tbAddUser.Post; end; end;
  14. PenelopeSkye

    Missing CommandText property

    Oh for Heaven's sake, of course on the day I already responded that I wasn't getting it I kept noodling and found a website that said for insert and update you should use TADOCommand. The following works. Thanks everyone! procedure TfDesignMaster.btnAddUserClick(Sender: TObject); var CommandText,userstring,OldValue,qstring: string; begin with dm do begin userstring := CurrentUserName; OldValue := dbedit23.text; qString := 'INSERT INTO AdimsUserField (JM_User,OldValue) VALUES (:a, :b)'; commandAddUser.CommandText := qstring; commandAddUser.Parameters.FindParam('a').Value := 'stuff'; commandAddUser.Parameters.FindParam('b').Value := OldValue; commandAddUser.Execute(); ShowMessage(userstring); end; end;
  15. PenelopeSkye

    Missing CommandText property

    So far I still haven't been able to get it to work, but thank you for all the suggestions!
  16. When I want to compile the project (Delphi 10.3) I just click on the 'Run without debugging' button. I am then asked for a password and then the app loads. I am trying to find a place to save my credentials so I don't have to enter them every single time, but I can't find out how. Can anyone help me find out where to store my credentials? Thanks! Please let me know what else you need. I have no idea if this will help but I deliberately made the compile break to get the lines below. Checking project dependencies... Compiling artdesign.dproj (Debug, Win32) dcc32 command line for "artdesign.dpr" c:\program files (x86)\embarcadero\studio\20.0\bin\dcc32.exe -$O- -$W+ -$R+ -$Q+ -$D1 -$YD --no-config -M -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows; DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include"; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -LEC:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl -LNC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NSDatasnap.Win;Web.Win;Soap.Win;Xml.Win;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell; System;Xml;Data;Datasnap;Web;Soap;Bde;Data.Win;Winapi;WinAPI.UI;FMX.MultiView;System.Win; -O"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release"; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports"; C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include"; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -R"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release"; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports"; C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include"; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -U"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release"; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports"; C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include"; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2; C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -VR -K00400000 -GD -NBC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 -H- artdesign.dpr [dcc32 Fatal Error] F2039 Could not create output file 'artdesign.exe' Failed Elapsed time: 00:00:00.8 Build started 9/14/2022 11:40:14 AM. __________________________________________________ Project "C:\Users\harvebet\Documents\GitHub\ADiMS2 Delphi 10 point 3\artdesign.dproj" (Make target(s)): Target _PasCoreCompile: c:\program files (x86)\embarcadero\studio\20.0\bin\dcc32.exe -$O- -$W+ -$R+ -$Q+ -$D1 -$YD --no-config -M -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -LEC:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl -LNC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NSDatasnap.Win;Web.Win;Soap.Win;Xml.Win;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Bde;Data.Win;Winapi;WinAPI.UI;FMX.MultiView;System.Win; -O"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -R"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -U"C:\Program Files (x86)\woll2woll\InfoPower4kRio\lib\20.0\win32";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLib-2.2;C:\Users\harvebet\Documents\Embarcadero\Studio\20.0\CatalogRepository\QuickLogger-1.45 -VR -K00400000 -GD -NBC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 -H- artdesign.dpr c:\program files (x86)\embarcadero\studio\20.0\Bin\CodeGear.Delphi.Targets(402,5): error F2039: F2039 Could not create output file 'artdesign.exe' Done building target "_PasCoreCompile" in project "artdesign.dproj" -- FAILED. Done building project "artdesign.dproj" -- FAILED. Build FAILED. c:\program files (x86)\embarcadero\studio\20.0\Bin\CodeGear.Delphi.Targets(402,5): error F2039: F2039 Could not create output file 'artdesign.exe' 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.58
  17. I found and commented out a couple of lines that allowed me to bypass the login. I then couldn't use the app because I didn't have permission :). I now see that the app is permeated with authorization checks. I see now how to comment them out (there are many of them) but then I would have to uncomment them before I put the app into production, which might lead to a security issue if I forget any. I'm not going forward this but thank you so much for your help!!! Penelope
  18. Peter, can you tell me how to look at the libraries? Anders, The highlighted line is where it stopped when I paused it. Does this point you in any particular direction? Thanks! 777A4F7E 8B0424 mov eax,[esp] 777A4F81 8BE5 mov esp,ebp 777A4F83 5D pop ebp 777A4F84 C3 ret 777A4F85 8DA42400000000 lea esp,[esp+$0000] 777A4F8C 8D642400 lea esp,[esp+$00] ntdll.RtlUserThreadStart: 777A4F90 833DDC69857700 cmp dword ptr [$778569dc],$00 777A4F97 740E jz $777a4fa7 777A4F99 8B0DDC698577 mov ecx,[$778569dc] 777A4F9F FF15E0918577 call dword ptr [$778591e0] 777A4FA5 FFE1 jmp ecx 777A4FA7 89442404 mov [esp+$04],eax 777A4FAB 895C2408 mov [esp+$08],ebx 777A4FAF E99F2AFFFF jmp $77797a53 777A4FB4 8DA42400000000 lea esp,[esp+$0000]
  19. On the left is from Delphi, on the right how it looks when I run the app. I do not understand how they can be different sizes! I have worked with it and googled this and have not found anything to be useful!! Does anyone have any suggestions? Thnks!
  20. PenelopeSkye

    DBEdit box not the same size on the app as it is in Delphi.

    That was very helpful, thanks Uwe!!!
  21. Here tis, thanks! The credentials required to run this are those of someone who used to work on this app before I got here. The only other place I use them is to log into our SAP Crystal reports, but I know of no connection between SAP and this app. The app does attach to a database but the sa credentials do not work for this login. The production app resides on a server but the credentials required to run the app do not get me on the server.
  22. I am trying to update an app. I type 871 into an edit box and close the app. When that happens I check the database. The cell associated with the DBEdit23 field is 871, but the IsMetallic field is not updated. What am I doing wrong? Please let me know what other info you need. Thanks! procedure TfDesignMaster.DBEditPMSExit(Sender: TObject); begin if DBEdit23.Field.AsString ='871' then begin dm.dsVendorProd.DataSet.Edit; dm.dsVendorProd.DataSet.FieldByName('IsMetallic').Value:='Y'; dm.dsVendorProd.DataSet.Post; end; end;
  23. PenelopeSkye

    DB field update using "DataSet.FieldByName" is not working

    To everybody who answered this thread: Apologies! I had no idea that you had to highlight the object, go to events, and add the procedure name!!
  24. PenelopeSkye

    Palette - Can't find "Data Controls"

    I have inherited a project. When I look in the palette I can't find 'Data Controls' to add a dbedit object. How do I add this category to the palette? I don't know what type of project it is, VCL, fire monkey etc..., if it makes a difference would you tell me how to verify? Thanks!
  25. PenelopeSkye

    Palette - Can't find "Data Controls"

    Thank you!!!!
×