Jump to content

bazzer747

Members
  • Content Count

    140
  • Joined

  • Last visited

Everything posted by bazzer747

  1. bazzer747

    Outlook Server Execution Failed

    Hi, When I create emails in Outlook using below code they all work without a problem. I'm using Office365, so the latest version of Outlook. However, when that same code is executed on a different PC, and one that uses Outlook 2013, I get 'Server execution failed, ProgID: 'Outlook Application' The start code for the email application is: try Outlook:= GetActiveOleObject('Outlook.Application'); except Outlook:= CreateOleObject('Outlook.Application'); end; When I google I get various replies to this issue (some of which are not a solution here), but wondered if any Delphi guys have hit this problem and know of a solution. Maybe a different way to open an Outlook instance?
  2. bazzer747

    Outlook Server Execution Failed

    Hi, When I create emails in Outlook using Indy they all work without a problem. I'm using Office365, so the latest version of Outlook. However, when that same code is executed on a different PC, one that uses Outlook 2003, I get 'Server execution failed, ProgID: 'Outlook Application' The start code for the email application is: try Outlook:= GetActiveOleObject('Outlook.Application'); except Outlook:= CreateOleObject('Outlook.Application'); end; When I google I get various replies to this issue, but wondered if any Delphi guys have hit this problem and know of a solution. Maybe a different way to open an Outlook instance?
  3. bazzer747

    Outlook Server Execution Failed

    Am I an idiot for not checking before post. Yes, wrong forum (I was working with Indy just prior and brain didn't disengage when I did this post, sorry). AND, a typo, the failure was on Outlook 2013 not Outlook 2003! I've since tested on Outlook 2010 and the code works fine. I'm thinking it's more of a permission thing on the client's PC, rather than Outlook itself. However, I'll shift this post to the correct forum now ...
  4. bazzer747

    SQL

    Is there a question here?
  5. bazzer747

    Notification of Replies

    Hi, When I raise a new topic I always check the 'Notify me of replies'. Fairly obvious, I suppose, as I don't log in every day. Which is great. However, on several topics I've raised, the subject matter being discussed does occasionally tend to drift off the main thread. Sometimes interestingly, sometimes not. It would be a nice addition if you could uncheck the 'Notify me of replies' when the latter happens. No big deal, just a thought ...
  6. bazzer747

    Notification of Replies

    Ah, I now see! This seems to be on all content rather than just a specific topic raised. But I see in the specific topic the above drop-down window has a 'Unfollow' button, which I'm thinking does the job. Thanks for pointing this out.
  7. bazzer747

    Learning Delphi

    In the early days (Delphi 3 and up), I bought every book there was and they really helped. Much better than online documentation. However, over the years I used them less often and eventually (under pressure from other half!) had to get rid of them. Space was the issue, plus I looked at them less frequently. I regret that now. Most of the Delphi books out there now are generally quite advanced and very expensive.
  8. bazzer747

    Learning Delphi

    A great place to start is LearnDelphi.tv Lots of free video's to view, but the paid for videos look at the details of all components in the VCL.
  9. bazzer747

    Firedac and MariaDB

    Hi, I'm trying to connect to a MariaDB database. I have MariaDB v10.3.24 installed on a NAS Server (32bit version). I can access it using HeidiSQL and see my tables etc. But from Delphi I'm not. I have also loaded MariaDB onto my PC, same version (the 32 bit version) and can see this from HeidiSQL. In my TfdConnections I have the same parameters as I see from the HeidiSQL Session Manager, so I know they are correct. What I get (trying to access either instance of MariaDB) is a message 'Cannot load vendor library [...libmariadb.dll ...]. The specified module could not be found. Hint: check it is in the PATH or application EXE directories, and has x86 bitness..' Well, I do have libMariaDB.dll in the EXE directory, I also have it in the C:\Program Files (x86)\MariaDB 10.3\lib directory, and both these paths are set as search paths in the project options. It is also in the Windows PATH environmental variable. I'm sort of at a loss now as to what else I can do. The error message would appear to be giving wrong information
  10. bazzer747

    FireDac Batchmove

    Hi, I'm just testing Batchmove to backup my tables from a Live MSSQL server to a backup MSSQL server.. So I'm using a SQLReader & SQLWriter with the BatchMove component. However, when I execute the BatchMove it only copies over 100 records. I see no property that says 'copy every record'. I do see a 'CommitCount' property set at 100, and if I change that to, say, 200, I get 200 records copied. But reading about this property indicates it is about doing transactions in batches of this number to avoid possible limits. So I would have thought it would do 100, then the next 100 and so on to the end. Am I missing a property here which will default to copying the whole table over. I'm finding the FireDac DocWiki on this quite difficult to find answers like this.
  11. Hi, Whilst I've used Firedac for some while now I've never tried to use Interbase with it. My normal connectivity, both local and on remote servers, is using MSSQL. However, with some time on my hands I've decided to go through Cary Jensen's Delphi in Depth: FireDac book which uses Interbase throughout. But ... at the first hurdle I'm stopped. I've created a new VCL project with a data modele, and on it placed a FDConnection. In the parameters I've set it to a IB driver, pointed it to the EMPLOYEE.GDB, added User_Name and Password, and set Server to 127.0.0.1. When I Test this connection I get ..Unable to complete network request to host !localhost/305" ... target machine actively refused it. Googling this I've seen lots of different thoughts but few that pertain to Delphi 10.4.1/InterBase 2020 which I have installed or don't appear applicable. I've disabled my anti-virus products in case they were blocking this connection. Any suggestions would be appreciated - I'm not a Windows guru, which maybe is what is needed to allow this connection.
  12. bazzer747

    Target machine actively refused connection

    Finally got it working. I think the problem was twofold - first I had IB Server 'developer_ib2020' running, and 'gds_db' wasn't running. I brought up IB Console and added 'gds_db' and created a new User. Then when I ran my application it connected successfully. So another case of the error message not giving a clue as to where the problem lay. It was really that I'd never used the 'gds_db' server before and therefore it wasn't configured correctly for use. Still not sure technically why it didn't connect to the 'developer_ib2020' instance that was running.. Now I'm connected I'll dig deeper and maybe start to understand the configuration aspects of these different server instances. Thanks all who responded to help me out. Really appreciated.
  13. bazzer747

    Target machine actively refused connection

    Yes, the service is running. See snapshot above.
  14. bazzer747

    Target machine actively refused connection

    So I am only in development on my PC, so when I installed Interbase I accepted all the defaults. This is why I'm a bit surprised that it doesn't work. It isn't that I'm doing anything complicated. Connecting to MSSQL is so simple and works seamlessly, I've had no issues at all. Yet, with Interbase I am getting issues all the time. No wonder I'm deciding not to use IB 🙂 What I have noticed, looking at Services, is the path to the executable is it points to the ..Program Files (x86)\Embarcadero\Studio\20.0\InterBase2020" -p developer_ib2020. So not the 21.0 directory (which is the 10.4 install). Could this be an issue? Also, in the Log On tab there's a checkbox 'Allow service to interact with desktop' which was unchecked. Checking it makes no difference. I'm thinking a good old uninstall/re-install to see if the previous installations have cross-contaminated each other ...
  15. bazzer747

    Target machine actively refused connection

    Hi, Yes, I have Interbase Server running - called developer_ib2020. And in the FDConnection it's almost exactly like yours: I did changed Protocol from 'local' to TCP/IP but made no difference (and Server from localhost to 127.0.0.1). On your last point - VendorHome and VendorLib properties, which DLL are you referring to?
  16. bazzer747

    FireDac Batchmove

    Hi, Thankyou for all the responses. This always encourages me to continue testing and following advice to get things working. As mentioned above, I have now setup a new project whose sole purpose is to copy records from a table on one server to a 'backup' table on a different server. I started with the TFDManager as recommended above (although I'm led to believe one is created in the background anyway). And it does work. All records are copied over successfully. So the problem I'm having in my original project isn't solved, but at least I can't suspect the components any longer, it must be how they are set up. Some more checking here! I'm not into spending on 3rd party tools to do what FireDac promises to do, I'm not into that world, mores the pity.
  17. bazzer747

    FireDac Batchmove

    Hi, Thanks for suggestions, but I'm talking about MSSQL Servers that are available to me from a Web hosting company, and this functionality isn't available to me. When I ask them about making backups they say I need to manage that functionality myself. They ensure their Servers are backed up, rest is up to Users. Maybe it's different with other hosting companies..
  18. bazzer747

    FireDac Batchmove

    Something else which seems amiss :-): What I really want to do is make backups of tables on a Live server and write them to tables on a different, backup server. Ignoring for a second the above issue, when I set up the SQLReader and SQLWriter to use the same TFDConnection, hence the same Server, it woks OK. When I set the SQLReader to point to the Live Server and the SQLWriter to a different backup Server I get an Access Violation! I'll start a totally new/clean project just to try this configuration, as I can't see why what I am trying here shouldn't work, it just makes better sense when making backups for them to on a totally different Server.
  19. bazzer747

    FireDac Batchmove

    Hi Roger, Yes, the TFDQuery, FetchOptions, AutoFetchAll is set to afAll. It looks like it gets this value from the TFDConnection, like the RowSetSize as I didn't have to change anything. And on the Pawel video, yes I looked at that to set my test up. I'll start it from the start again, though, as I jumped in n to just the BatchMoive bbits.
  20. bazzer747

    FireDac Batchmove

    I have Fetch Mode set to fmAll in FetchOptions.
  21. bazzer747

    OnClick Oddity

    Hi In a window I have a 'floating' panel (calledpanEdit)that follows the items in a dbgrid. On some occasions I don't want to see that panel. Elsewhere I have an edit field and on it's OnClick event I have: panEdit.Visible:= False; which works fine, making the panEdit panel invisible. However, that's not so good in design terms as I have to enter this edit field to make the panel invisible. So I have put another panel on the form, made it effectively invisible by not showing borders and colouring it the same as the background. On it's OnClick event I've put the same code to make panEdit invisible. But it doesn't! I follow the code in debug mode and when I click on this panel it goes to the OnClick event, runs the panEdit.Visible:= False code, but does nothing. Am I missing something here? There's an OnClick event for a panel and it runs the code but doesn't run the code, if you see what I mean. I've put a ShowMessage('Hello there') in the OnClick event and that shows, so it is running that code, but ignoring, the panEdit.Visible:= False; code.
  22. bazzer747

    OnClick Oddity

    Hi Many thanks for this advice. I think over the years I've just picked up bits of code and manipulated it to do what I want it to do and fallen into this 'separation' trap. With most of my projects not accessing tens of thousands of records there have been no time penalties in some code being run lots of times when there is no need so that hasn't been an issue for me. But I'll certainly start to look to do what I want outside of the drawing event.
  23. bazzer747

    OnClick Oddity

    Please explain why you say that. I change colour and font in the drawing event, why not make a panel visible or invisible, if that is what is needed.
  24. bazzer747

    OnClick Oddity

    Darn! Found the problem. I have code in the dbgrids OnDrawColumnCell event which sets the panel visibility to True, and this is getting run after I click the other panel. Not sure why it should do this but I traced it in the OnDrawColumnCell event.
  25. bazzer747

    DecodeDate Issue

    Hi, I have a project where I need to get the value of a year in a field so I use DecodeDate( dtDate, Year, Month, Day); where dtDate is a TDateTime variable, Year, Month, Day are Word variables. When I run the code I get an error - 'Constant or type identifier expected'. I've downloaded the example Embarcadero have for using DecodeDate: procedure TfAccounts.Button1Click(Sender: TObject); var Present: TDateTime; Year, Month, Day: Word; begin Present:= Now; System.SysUtils.DecodeDate(Present, Year, Month, Day); Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month ' + IntToStr(Month) + ' of Year ' + IntToStr(Year); end; .. and get this same error. The 'Word' is red-underlines as the error. I have System.SysUtils in the Uses clause: uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, ... etc I have used this same code in a different project and it works with no error. I can't think of why it isn't working in this particular project. Unless some other unit in the Uses clause is causing a problem, although SysUtils comes almost first. Any thoughts would be welcomed.
×