Andre Wrote:

 

I used "multiple commands". My first thought was to call the dispose as well. So I did, but it did not change the behaviour on the server side.

I will try the prepare and see if anything changes. Maybe I did not understand the on-line help and I am doing something wrong.

Another side effect is not only the rapidly increasing memory requirement of the Firebird server but as well as the 100% CPU time fbserver.exe consumes.

 
.
.
.
                       if (Counter > 1)
                        {
                            Command =
                                "execute procedure ADD_FIELD_SET_DATA('"+SessionId+"', '"+FieldSetName+"', '"+Header[j]+"', '" + Data + "', '"+ObjectId+"')";
                        }

                        FirebirdSql.Data.Firebird.FbCommand cm =
                            new FirebirdSql.Data.Firebird.FbCommand(
                            Command, c.Connection, t
                            );

                        cm.ExecuteNonQuery();
.
.
.

 

Try this:

 

FirebirdSql.Data.Firebird.FbCommand cm = new FirebirdSql.Data.Firebird.FbCommand(“ADD_FIELD_SET_DATA”, c.Connection, t);

cm.CommandType = CommandType.StoredProcedure;

FirebirdSql.Data.Firebird.FbParameter pr1 = new FirebirdSql.Data.Firebird.FbParameter(“@I_SESSIONID”, {Data Type For Column});

FirebirdSql.Data.Firebird.FbParameter pr2 = new FirebirdSql.Data.Firebird.FbParameter(“@I_FIELDSETNAME”, {Data Type For Column});

FirebirdSql.Data.Firebird.FbParameter pr3 = new FirebirdSql.Data.Firebird.FbParameter(“@I_HEADER”, {Data Type For Column});

FirebirdSql.Data.Firebird.FbParameter pr4 = new FirebirdSql.Data.Firebird.FbParameter(“@I_DATA”, {Data Type For Column});

FirebirdSql.Data.Firebird.FbParameter pr5 = new FirebirdSql.Data.Firebird.FbParameter(“@I_OBJECTID”, {Data Type For Column});

 

cm.Parameters.Add(pr1).Direction = ParameterDirection.Input;

cm.Parameters.Add(pr2) .Direction = ParameterDirection.Input;

cm.Parameters.Add(pr3).Direction = ParameterDirection.Input;

cm.Parameters.Add(pr4).Direction = ParameterDirection.Input

cm.Parameters.Add(pr5).Direction = ParameterDirection.Input;

if (Counter > 1)

{

            pr1.Value = SessionId;

            pr2.Value = FieldSetName;

            pr3.Value = Header[j];

            pr4.Value = Data;

            pr5.Value = ObjectId;

            cm.ExecuteNonQuery();

 

}

 

HTH,

Cecil Martin

 

 

Reply via email to