Procedure stockée sur mysql cannot be found
malvax
-
malvax -
malvax -
Bonjour,
--------------------------------------------------------------------------------
Bonjour,
J'essaye d'utiliser via c# une procedure stockée sur une base de donnée mysql.
Mais j'ai un message d'erreur le voici :
"Procedure or function 'AddClient' cannot be found in database 'MailTo'."
pourtant j'ai bien créé un procédure AddClient.
pouvez vous me guider afin que j'arrive à utiliser cette procédure.
Voici ma procedure
voici mon code csharp
Je vous remercie de votre aide.
--------------------------------------------------------------------------------
Bonjour,
J'essaye d'utiliser via c# une procedure stockée sur une base de donnée mysql.
Mais j'ai un message d'erreur le voici :
"Procedure or function 'AddClient' cannot be found in database 'MailTo'."
pourtant j'ai bien créé un procédure AddClient.
pouvez vous me guider afin que j'arrive à utiliser cette procédure.
Voici ma procedure
DELIMITER | CREATE PROCEDURE AddClient (OUT IDClient INT(32)) BEGIN INSERT INTO clients(nomClient) VALUES('nouveauclient'); SELECT LAST_INSERT_ID() INTO IDClient; END|lorsque je fais via la console mysql ( call Addclient(@monid); puis select @monidça fonctionne. donc la procédure existe belle et bien )
voici mon code csharp
this.MyAdapter.SelectCommand = new MySqlCommand(MySQLCmd, this.Connection); this.Connection.ConnectionString = this.ConnectionStr; this.OpenConnect(); // jusqu'ici j'ouvre ma connexion. suite à différents test et autre fonction je sais que la connexion s'ouvre bien. MySqlCommand cmd = this.Connection.CreateCommand(); cmd.CommandText = "AddClient"; cmd.CommandType = CommandType.StoredProcedure; MySqlParameter outParam = new MySqlParameter("@IDClient", MySqlDbType.Int32); outParam.Direction = ParameterDirection.Output; cmd.Parameters.Add(outParam); cmd.ExecuteNonQuery();
Je vous remercie de votre aide.
A voir également:
- Procedure stockée sur mysql cannot be found
- Mysql community server - Télécharger - Bases de données
- A conexant audio device could not be found. the application will now exit ✓ - Forum Pilotes (drivers)
- Iptv sorry this video cannot be played - Forum Téléviseurs
- Input signal not found ✓ - Forum Matériel & Système
- No epg found - Forum Programmation