Re: Column can not be null
Posted by:
Guy Shen
Date: January 12, 2010 06:39PM
OK, Chad. I hope you're still with me, because i have another problem, having this one solved.
In Query browser, i created the function in such fashion that it will recieve three arguments, and insert them into the table, and everything is working great.
The only thing that still bugs me, is the last piece of code.
When the insertion is done, the function returns the value 1 (as int).
So, i've used this code to get the "1" :
MySqlDataReader DR;
mycon.Open();
DR = mySqlCommand.ExecuteReader();
DR.Read();
Label4.Text = DR.GetInt32(0).ToString();
Thing is that i get an error message telling me the following:
"Invalid attempt to read from column ordinal" and he checks the last line of code as the problematic one. Any ideas ? Thanks ahead.
P.S assuming that I wanted to work with ExecuteScalar(), how could that be done?
Edited 1 time(s). Last edit at 01/12/2010 06:47PM by Guy Shen.
Subject
Written By
Posted
Re: Column can not be null
January 12, 2010 06:39PM
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.