I've written a program in VBA (not excel) to upload data to a PostgreSQL database using ADODB via a DSN. Often it works without a problem, but sometimes I get a "Specified driver could not be loaded due to system error 127" error. When I get this error, I've found that the only solution is to restart my machine (which acts as both the client and the server in this case).
I've tried modifying the DSN to use either 32-bit or 64-bit, but that hasn't helped. When the error occurs, I've tried restarting the PostgreSQL service, but that hasn't helped either.
I've googled for solutions, but nothing seems to help.
I'm hoping for some solutions to either resolve the problem or offer an alternative to this method that bypasses the problem - any suggestions would be great.
Happy to share code if it helps, but it's all simple tutorial level stuff.
Related
I have a simple PHP application running on this server which allows other people to verify some information on-line. The apache was running OK until a few days back.
The application uses Postgrees and the apache service was configured by an add-on "Enterprise Db Apache", it was not configured by me and is connected to a portal to be shown on-line. This was kinda dropped on me and I had no prior knowledge or experience with databases nor servers and need to put it back on-line. How can I start to find out what made it stop?
Here's a link to the error I'm receiving when trying to start it back again:
https://dl.dropboxusercontent.com/u/12837412/Erro%201053.png
Tried updating .NET to no success,
I've searched around SO and all the threads I found were based on custom services people wrote, and found out that this error code is very generic, I'm very lost and have my neck on the chopping block.
EDIT: Tried some fixes suggested here but had no success. I'm thinking about reinstalling the service, is it a really bad idea? Is there a safe way of doing this without loss of data in the Database? Is there a tutorial on this here already?
The problem was with compatibility of the versions of C/C++ libraries in the server which lead to the programs related to the service not being able to start properly. A simple reinstalation of the compatible version of the libraries made the service able to be started again.
Maybe your service is taking longer time than 30 seconds (Windows default timeout) to start and report ready to the Service Control Manager. Usually this happens because of performance issues.
A possible solution for this is to extend it through the Registry.
Go to Start > Run > and type regedit
Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
With the control folder selected, right click in the pane on the right and select new DWORD Value
Name the new DWORD: ServicesPipeTimeout
Right-click ServicesPipeTimeout, and then click Modify
Click Decimal, type '180000', and then click OK
Restart the computer
I have an RDBM which needs to be converted to MySQL. I would like to open the database with Workbench and get a file to someone. However every time I run the migration wizard for a Microsoft Access RDBM, ODBC data source parameter, and then find the data source to migrate, it simply just blocks the process on the test, saying:
"Test Source DBMS Connection:
Operation Cancelled"
The RDBM is either type .mdf, .accd or 5.3 ANSI. None allow a connection. I have searched Oracle and other sources online with very few hints or clues as to why this happens to my database. The only other alternative is buy some expensive conversion software. Please help! I have not a clue what information might be of use to me to solve this problem. I have used the standard Oracle/MySQL tutorial: https://dev.mysql.com/doc/workbench/en/wb-migration-database-access.html
Also to note I have tried disabling all firewalls. And the general ODBC connections I make just quit working, saying in various ways they cannot connect. Any resources to point me to that might be helpful with some more basics on this?
I also found this resource which explains why certain pipe connections are not working for ODBC: http://dev.mysql.com/doc/refman/5.6/en/can-not-connect-to-server.html It lists some command prompts which I am uncertain how to use or where to enter. I tried running these as admin on a standard cmd but they just say command not recognized.
I've just encountered the same issue while testing out the MySQL workbench software.
I had installed the 64-bit version of MySQL Workbench. However, I only had 32-bit Access, and so the ODBC drivers were all 32-bit. Uninstalling and installing 32-bit version of MySQL solved this issue and let me connect to my local Access database for migration. (download 32-bit installer from here: https://dev.mysql.com/downloads/workbench/)
I know you found a work-around, but if you wanted to go back to Workbench, checking that you are using all 32-bit (or all 64-bit) software & drivers might help.
Cheers,
Dave.
On "System DSN" (32 bit) press Add select Microsoft Access Driver (.mdb,.accdb), press Finish, On setup page press 'select' and map to the database you want to connect to and click on the database on left pan click ok. add database name and press OK. close the window. now you can use ODBC for access in MYSQL(32 bit).
A Customer of mine has a Problem with my in vb.net developed extension in ArcMap. The extension is installed on a Windows 8.1 with ArcMap 10.3. First it worked fine, but now (since one week) there comes an error from the 'System.Transactions.Diagnostics.DiagnosticTrace' when the extension try to connect via oledb with an access db (personal geodatabase). The strange thing is, that the stand alone app (without ArcMap) has no problems to connect (and it uses the same oledb object). Does anyone have a clou what can cause the problem? thanks a lot.
I solved it. The problem was a brocken config-file (user.config) in the user-account (C:\Users\\AppData\Local\ESRI\DefaultDomain_Path_...\).
Forgive me if this is a stupid question, I'm fairly new to writing services. I've written a service that runs a timer and the timer code runs some checks to ensure our systems are up and running. It's written in VB.Net, framework 1.1. I then install the service using "sc create". The service works beautifully on the XP Pro machine that I'm developing on. However, when I install the service on a Windows 2003 server 64 bit, the service fails with error 1053 immediately. I put some debugging in to write to a text file as the first line of code in the OnStart function but even that doesn't run, so there must be a problem in the program starting up. Finally in desperation I created a brand new Windows Service in a new VB project in Visual Studio 2003 and compiled an empty service that merely declares and sets the value of a string variable in the OnStart function as follows:
Dim strTmp As String
strTmp = "hello"
Even that failed on the W2K3 server, but works fine on the XP dev machine.
The server has .Net Framework 1.1 installed and working, we use it in our CMS (written in ASP.Net 1.1).
The service runs as the local system account. I tried enabling interaction with the desktop but that didn't help. I ran Process Monitor and there are no access denied events. I emptied the Application Event Log, still doesn't work. No other events to help me out in the logs. Definitely using the Release build of the application. Permissions on the exe file are full control for System and for Admins.
Any ideas anyone? It must be something simple, but I'm damned if I can figure it out!
Thanks in advance.
#DavidHi, many thanks for the suggestions. I donĀ“t think the first point is my problem, partly because the MS article is about stopping or pausing the service, mine fails on starting; but also because the service does not timeout, there is no 30 second wait, it fails immediately. Secondly, when you say add an exception handler to the service startup, do you mean the OnStart sub? I tried adding a debug file write in there, but I'll try adding an event log instead. Regarding the systems checks, it can't be that because the brand new empty test service I created shows the same behaviour and that does not do anything at all. You last point could be the key. My dev environment IS 32bit. I'll do some research on the corflags thing, or perhaps I can build a 64bit dev environment. Many thanks again, you've given me some new things to think about at least!
Ok, have found a workaround. I was putting my exe file in System32. When I put it in a different folder, created by myself, the service ran, albeit briefly. I then had to move the ini file and the log files that it reads/writes to that folder too, rather than System32, and all seems to work nicely. God knows why it doesn't like running from System32 but at least it works now! Thanks for the help guys.
This looks very similar to this question which might help you out:
Starting a windows service fails with error 1053
A couple of other things to look out for:
Make sure you don't have either of the following statements in your deployed service:
System.Diagnostics.Debugger.Launch
System.Diagnostics.Debugger.Break
You may need to run the service with an account other than Local System (depending upon the permissions required by your service).
The 1053 error is a timeout related to the service control manager waiting for the service to respond to your start request. There is a knowledgebase article that refers to managed service stop request issues specifically relating to Framework 1.1-based services, so it is not precisely describing your problem, but it may have relevance in your situation. The link is provided for your reference.
http://support.microsoft.com/kb/839174
The other suggestion I would make to further diagnose the issue is to determine whether the Start is failing due to a "hidden" exception occurring in your service's startup code; the start call would not see the exception and could make you think it was merely timing out.
I would suggest you add an exception handler to your service startup that does nothing more than log a message to the event log with the particulars of the exception if one is caught. That would at least give you an idea that something is going wrong specifically within the service, and give you more information than you have right now.
One last thought: Does the service check the systems you describe over a network connection? If so, LocalSystem won't have sufficient privileges to perform network access.
Good luck!
EDIT One other possibility:
Is your development environment/execuable 32-bit? You mention your server is 64-bit, so you may need to use the "corflags" tool that forces 32bit operation on your executable
corflags /32bit+ YourServiceExectubable.exe
The source for this information was the following SO post:
32-bit Windows services in 64-bit environment
**Unfortunately, it appears corflags is applicable only for 2.0 assemblies, and was designed for specifically this type of problem. **
i have an application written in VFP 7, somewhere in the application i call a function in a dll using the following :
declare long FunctionName in DLL_NAME.dll string#, string#
.
.
.
RETURN FunctionName( StringParam1, StringParam2)
calling this function generates an error :
The following error has occurred:
Message: Cannot load 32-bit DLL d:\folder\DLL_NAME.dll.
i tried registering the dll using the 32/64 bit regsvr...no luck !
Info that could help identify the problem :
the dll file is not local, it is in a folder in a network mapped drive.
thank you very much for your help.
Aside from VFP not supporting anything 64-bit, I would look at the fact you are trying to load a dll across the network.
Eliminate that as a possible issue and copy it LOCALLY and load it from that...
Try to eliminate everything ELSE, including your VFP application. I would start directly from the VFP command window and do nothing but have a simple .prg file. In it, put nothing but the declaration and reference a LOCAL copy of the dll file. Set the values for your parameters, and then call the function.
If that doesn't work, then it doesn't matter WHERE in the application its being called... you've just eliminated that whole set of conditions and environment.
Its almost like support I offer to clients sometimes when trying to do something in our app that requests data from the internet. I have them manually go to their browser and put in whatever URL our app would be trying to go to. If they can't get to it from the browser, its something from their firewall, IP blocking, or other... it has nothing to do with our app. You might be running into a similar situation. Leave out all other elements and just get the few to absolutely test the problem isolated to itself.
I agree that the issue is likely that the dlls are located on a shared network. I have solved this problem in the past by copying the files to the local machine(s).
However, according to this article (link below), you can allow a FoxPro app (or any .exe for that matter) to use dll's from a networked drive if you add a special config file that tells the .Net framework that it's okay to access networked dlls for a certain app.
Here is the link: http://www.west-wind.com/webconnection/docs/index.htm?page=_36e0qlogr.htm