I can't insert variable (Textbox) Oradirect Mobile

I can't insert variable (Textbox) Oradirect Mobile

Postby JUNNIORSP » Fri 10 Oct 2008 20:25

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
JUNNIORSP
 
Posts: 2
Joined: Fri 10 Oct 2008 19:48

Postby AndreyR » Mon 13 Oct 2008 10:21

You should bind the created OracleParameter1 to OracleCommand, like this:
Code: Select all
Me.OracleCommand.Parameters.Add(OracleParameter1)
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby JUNNIORSP » Mon 13 Oct 2008 12:12

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
JUNNIORSP
 
Posts: 2
Joined: Fri 10 Oct 2008 19:48

Postby Shalex » Tue 14 Oct 2008 06:31

Please send me (alexsh at devart.com) a test project to reproduce the problem and the script that creates the database objects and fills them with data.
Shalex
Devart Team
 
Posts: 7703
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle