i can't create oraclecommand for insert variable textbox (texto1.text)
when execute this program the value inserted is null
Me.OracleCommand.CommandText = "insert into exlocfis values(':my_par','415 ','S')"
OracleParameter1.ArrayLength = 0
OracleParameter1.ObjectTypeName = Nothing
OracleParameter1.OracleDbType= CoreLab.Oracle.OracleDbType.VarChar
OracleParameter1.ParameterName = "my_par"
OracleParameter1.Precision = CType(0, Byte)
OracleParameter1.Scale = CType(0, Byte)
OracleParameter1.Size = 0
OracleParameter1.Value = texto1.Text
I can't insert variable (Textbox) Oradirect Mobile
You should bind the created OracleParameter1 to OracleCommand, like this:
Code: Select all
Me.OracleCommand.Parameters.Add(OracleParameter1)
Me.OracleCommand.CommandText = "insert into exlocfis values(:my_par,'xxx','a')"
OracleParameter1.ArrayLength = 0
OracleParameter1.ObjectTypeName = Nothing
OracleParameter1.OracleDbType = CoreLab.Oracle.OracleDbType.VarChar
OracleParameter1.ParameterName = "my_par"
OracleParameter1.Precision = CType(0, Byte)
OracleParameter1.Scale = CType(0, Byte)
OracleParameter1.Size = 0
OracleParameter1.Value = Me.texto1.Text
Me.OracleCommand.Parameters.Add(OracleParameter1)
on inserting a value a about to text box (Me.texto1.Text) on application is return an error informing what the worth inserido is null when to open the code to verify the (oracleParameter1.Value = "") I eat I do wherefore the oracleParameter1.Value he may be equal the value from variable text box during the application , as him assuming the worth when is compiler & the keeps
OracleParameter1.ArrayLength = 0
OracleParameter1.ObjectTypeName = Nothing
OracleParameter1.OracleDbType = CoreLab.Oracle.OracleDbType.VarChar
OracleParameter1.ParameterName = "my_par"
OracleParameter1.Precision = CType(0, Byte)
OracleParameter1.Scale = CType(0, Byte)
OracleParameter1.Size = 0
OracleParameter1.Value = Me.texto1.Text
Me.OracleCommand.Parameters.Add(OracleParameter1)
on inserting a value a about to text box (Me.texto1.Text) on application is return an error informing what the worth inserido is null when to open the code to verify the (oracleParameter1.Value = "") I eat I do wherefore the oracleParameter1.Value he may be equal the value from variable text box during the application , as him assuming the worth when is compiler & the keeps