Yahoo!  :)

Found the problem... specifying the size on string parameters seems to be enough to cause this to happen every time.  It seems to happen even if the length is specified correctly.

This is with .Net 2.0, btw.

Here's a testcase that should be good enough:

        static void Main(string[] args)
        {
            string connectionStr = @"Server=localhost;Database=d:\db.gdb;User=SYSDBA;Password=password;Pooling=false";
            DBConnection conn = new DBConnection(connectionStr, DBConnection.DatabaseType.Firebird);

            FbConnection fbConn = (FbConnection)conn.Connection;
            FbTransaction dstTxn = fbConn.BeginTransaction (System.Data.IsolationLevel.ReadCommitted);
            FbCommand cmd = fbConn.CreateCommand();
            cmd.CommandText = "INSERT INTO COMPONENTCOMMENT (COMPONENTID, COMMENTRANK, COMMENTTYPE, COMMENTDESCRIPTION, COMMENTBODY) VALUES (@COMPONENTID, @COMMENTRANK, @COMMENTTYPE, @COMMENTDESCRIPTION, @COMMENTBODY);";
            FbParameter fbParam = cmd.CreateParameter();
            fbParam.ParameterName = "@COMPONENTID";
            fbParam.Value = 112000059;
            fbParam.DbType = System.Data.DbType.Int32 ;
            cmd.Parameters.Add(fbParam);

            fbParam = cmd.CreateParameter();
            fbParam.ParameterName = "@COMMENTRANK";
            fbParam.Value = 1;
            fbParam.DbType = System.Data.DbType.Int32;
            cmd.Parameters.Add(fbParam);

            fbParam = cmd.CreateParameter();
            fbParam.ParameterName = "@COMMENTTYPE";
            fbParam.Value = 2;
            fbParam.DbType = System.Data.DbType.Int32;
            cmd.Parameters.Add(fbParam);

            fbParam = cmd.CreateParameter();
            fbParam.ParameterName = "@COMMENTDESCRIPTION";
            fbParam.Value = "Disclaimer";
            fbParam.DbType = System.Data.DbType.String;
            //fbParam.Size = 250;
            fbParam.Size = fbParam.Value.ToString().Length;
            cmd.Parameters.Add(fbParam);

            fbParam = cmd.CreateParameter();
            fbParam.ParameterName = "@COMMENTBODY";
            fbParam.Value = "This fabric is not recommended for use on Motion Upholstery.";
            fbParam.DbType = System.Data.DbType.String;
            //fbParam.Size = 250;
            fbParam.Size = fbParam.Value.ToString().Length;
            cmd.Parameters.Add(fbParam);

            cmd.Transaction = dstTxn;
            int resultSize = cmd.ExecuteNonQuery();
            dstTxn.Commit();
            conn.Close();
        }
    }

Thanks!
Jess


On 4/11/06, Jesse Sightler <[EMAIL PROTECTED]> wrote:
I'm working on that.  The really bizarre thing is that this definitely happens, but if I try to boil it down to a test-case it works.

I'm having a hard time figuring out the difference between my test case and the actual run.

I'll let you know if I can figure this out.

Thanks,
Jess



On 4/11/06, Carlos Guzmán Álvarez < [EMAIL PROTECTED]> wrote:
Hello:

> I tried that as a hard-coded hack (and confirmed that the hack was
> setting the FbDbType by watching in the debugger), but it did not make
> a difference.

Please, send a test case to my private email including a test database.


--
Carlos Guzmán Álvarez
Vigo-Spain

http://carlosga.blogspot.com/

"When you don't code, you tend to become one of those architects who thinks everything is possible" ( Anders Hejlsberg )



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Reply via email to