Re: Column can not be null
Posted by:
Guy Shen
Date: January 12, 2010 05:22PM
Hey Chad.
The ASP.NET code goes like this :
MySqlConnection mycon = new MySqlConnection...);
MySqlCommand mySqlCommand = mycon.CreateCommand();
mySqlCommand.CommandText = "create_new_cust";
mySqlCommand.CommandType = CommandType.StoredProcedure;
mySqlCommand.Parameters.Add("CN", MySqlDbType.String).Value = TextBox1.Text;
mySqlCommand.Parameters.Add("CS", MySqlDbType.String).Value = TextBox2.Text;
mySqlCommand.Parameters.Add("CC", MySqlDbType.String).Value = TextBox3.Text;
//THE FUNCTION SHOULD RETURN 1 FOR SUCCESFUL INSERTION //
MySqlDataReader DR;
mycon.Open();
DR = mySqlCommand.ExecuteReader();
DR.Read();
Label4.Text = DR.GetInt32(0).ToString();
mySqlCommand.Connection.Close();
Thanks for you HElp
Subject
Written By
Posted
Re: Column can not be null
January 12, 2010 05:22PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.