-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I call a mysql stored procedure? #87
Comments
Sorry for the late response, I forgot that you had asked this question! |
@Rajiv-Kulkarni - I've fixed this in the latest preview release - https://www.nuget.org/packages/CodeOnlyStoredProcedures/2.3.0-pre05 You can set it up to use the backticks easily by doing this before making any stored procedure calls: |
Thanks. I will give it a try and let you know. On Thursday, October 13, 2016, Abraham Heidebrecht [email protected]
Rajeev S Kulkarni / Sr. Software Engineer / Common Technologies Tools |
I installed the 2.3.0-pre05 and tried to use it this way: Is that correct? Now I am getting error on the 2nd and the 4th line. Could you let me know how to use it? Thanks. |
@Rajiv-Kulkarni I see you! 👍 |
Oops... I can't believe I did that. It should be exposed as a static method on |
Okay, sorry about that. It should be useable now with the following: |
I am trying to call a mysql stored proc in a schema:
IDbConnection db = _context.Database.Connection;
var sp = new StoredProcedure<vw_employees>(CommonHelper.GetDatabaseName(), ".sp_get_list_of_all_users();");
var allUsers = sp.Execute(db);
The sp.Execute() call fails with this error:
[MySqlException (0x80004005): Procedure or function '
[
' cannot be found in database '[bidmaster_dev]
'.]where schema name bidmaster_dev is returned by the call CommonHelper.GetDatabaseName(). Not sure why it is appending square brackets the sql server query style. How can I make it MySQL aware? Thanks.
The text was updated successfully, but these errors were encountered: