dotConnect is calling the stored procedure 2x

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Burnone
Posts: 5
Joined: Fri 20 Nov 2009 19:25

dotConnect is calling the stored procedure 2x

Post by Burnone » Tue 01 Dec 2009 17:08

I have verified that from my C# code the stored procedure is getting called 2x.

I added this line into ALL my stored procedures called by my C#/ASP code and confirmed that this line is executing 2x for every 1 call to a stored procedure.

INSERT INTO test (`count`) VALUES (2);

Is there a property on the dotConnect objects I am using I need to set, or is this a bug? It is a serious bug that is a show stopper for me right now.

-- Sample Code --

Code: Select all

Devart.Data.MySql.Web.MySqlDataSource mySqlDataSource = new Devart.Data.MySql.Web.MySqlDataSource(Constants.Config.ConnectionString, "foo");
mySqlDataSource.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
mySqlDataSource.Selected += new SqlDataSourceStatusEventHandler(Call_OnSelected);

mySqlDataSource.SelectParameters.Add("id1", System.Data.DbType.Int64, "1");
mySqlDataSource.SelectParameters.Add("id2", System.Data.DbType.Int64, "2");
Parameter result = new Parameter("result", System.Data.DbType.String);
result.Direction = System.Data.ParameterDirection.Output;
mySqlDataSource.SelectParameters.Add(result);

// Tried with and without this statement...
// mySqlDataSource.DataBind();

mySqlDataSource.Select(DataSourceSelectArguments.Empty); 
Thanks

Burnone
Posts: 5
Joined: Fri 20 Nov 2009 19:25

Post by Burnone » Tue 01 Dec 2009 18:35

I think I figured this out. User Error on my part.

If you are interested...
I was opening the same connection again later on which was forcing the call. Argh... thanks.

Post Reply