Ok, i tried to change to this:

                da_cli.InsertCommand = con.CreateCommand();
                // DADOS:
                   da_cli.InsertCommand.CommandText = "INSERT INTO CLIENTES (CLI_COD,CLI_NOME, CLI_SOBRENOME) VALUES(@cli_cod,@cli_nome,@cli_sobrenome)";
                   da_cli.InsertCommand.Parameters.Add("@cli_cod", FbDbType.Integer).Value = codigo;
                   da_cli.InsertCommand.Parameters.Add("@cli_nome", FbDbType.VarChar).Value = txtCli_nome.Text.ToString();
                   da_cli.InsertCommand.Parameters.Add("@cli_sobrenome", FbDbType.VarChar).Value = txtCli_sobrenome.Text.ToString();
                   da_cli.Update(ds_cli, "CLIENTES");
                   ds_cli.AcceptChanges();

But i got the same error.

Am i making it the right way? or is there another way to do this insert on my database? cause google isnt helping much in this case :(

Anyway, thanx for the quick reply :)

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

> The error occur on the bold part, if i use: INSERT...VALUES('" +
> txtCli_nome.Text.ToString() + "') it works, but if i use
> Add("@cli_nome", txtCli_nome.Text.ToString()), it gives me that error,
> anyone knows why am i getting that?

Try to add the parameters using the ctor that takes a FbDbtype
parameter, if it didn't work send a test case ( database included ) to
my private email for review.



--
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