MySQL Forums
Forum List  »  MySQL for Visual Studio

Unable to call MySQL Stored Procedures from my Windows Services Application (at run-time)
Posted by: Peter Kelly
Date: September 03, 2020 12:40PM

Hi All,

this will be my first post on the forum, but I am currently in the process of getting my MySQL application up and running, and the forum here has so far been invaluable.

I have hit my first major road block, and any guidance that can be provided to assist would be great.

The application (Windows Service) is being developed on my local machine using Visual Studio 2019.

The MySQL database is being hosted on my virtual Windows Server 2016 with Azure.

Connections to the database are fine, with a successful result when pinging the database.

I have created my first stored procedure using MySQL Workbench.
The procedure has been tested with Workbench, and is executing the code correctly.

Moving over to Visual Studio however, and more specifically the Windows Service Application, after a successful connection, the following error is recorded when attempting to run the ExecuteNonQuery() command;

Procedure or function '' cannot be found in database '``'. Verify that user 'MYUSERNAME'@'MYDOMAIN' has enough privileges to execute.

When I compile the application and install the Windows Service successfully with INSTALLUTIL, a successful connection to the database is made, but the same error occurs.

Suspecting this is something to do with user permissions, I would like to clarify I am currently making all these successful log ons to the DB with an administrator username, setup from any host name '%'.

With the error message displaying, both when debugging and compiled as a Windows Service, I decided to create a standard Windows Application and paste the code in there, where the stored procedure runs successfully.

So I am stuck;
using the same user account, the windows services applications are connecting but there are unable to run the stored procedure, but the windows application runs fine.

For the design of my project, the requirement to get the Windows Service application updating the MySQL database is important.

This perhaps is a simple question to answer, but for a newbie like me, it has me stumped for a few days now.

There is something on the web about Windows NT usernames etc when using a Windows Service, but to be honest, it is kinda lost on me, and information on the internet is somewhat limited.

Any help much appreciated,


Options: ReplyQuote

Written By
Unable to call MySQL Stored Procedures from my Windows Services Application (at run-time)
September 03, 2020 12:40PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.