Using jc_transform

User 8710c16ea0

02-06-2010 13:25:34

Hi there, i am using the jc_transform method in a .NET application, but i'm not entirely sure how it should be used within .NET. Could someone please give me an example of how it should be used...this is what i have so far...


 


using (OracleConnection connection = new OracleConnection(connectionstring))
                {
                    
                    
                    OracleCommand oc = new OracleCommand("SELECT jc_transform() from dual;", connection);
                    oc.CommandType = CommandType.StoredProcedure;
                    connection.Open();

                    oc.Parameters.Add("reaction", OracleType.VarChar);
                    oc.Parameters["reaction"].Value = smirkin;
                    oc.Parameters.Add("reactants", OracleType.VarChar);
                    oc.Parameters["reactants"].Value = moleculeContentTxt.Text;
                    oc.Parameters.Add("products", OracleType.VarChar, 100);
                    oc.Parameters["products"].Direction = ParameterDirection.Output;

                    oc.ExecuteNonQuery();

                    if (oc.Parameters["products"].Value.ToString().Length > 0)
                    {
                        listBox1.Items.Add(oc.Parameters["products"].Value.ToString());
                    }

                    connection.Close();
                }

ChemAxon aa7c50abf8

02-06-2010 15:04:29

Hi,


Are you having a .NET problem or a JChem Cartridge problem?



I am not an experienced .NET programmer, but I'd say the parameters are missing from here:



OracleCommand oc = new OracleCommand("SELECT jc_transform() from dual;", connection);

Peter