I am developing web application using Csharp and orcale as database.I have 2 problems.
1 when I run the sql below it is not picking the value even when they is a value. Where I am going wrong?
2 The value is not been used outside the
while (OraclerRD.Read())
{
VaAmountPaid = OraclerRD[0].ToString();
}
How can I ensure that it is being used outside the while. Please help.
sql = "SELECT AmountToBePaid FROM SalesPayment WHERE salesday ='" + VouncherNumber + "' AND KEYYEAR ='" + Year.ToString() + "' AND KEYStation='" + Station.ToString() + "'";
OraclerRD = CheckDetails.myIdsReader(sql, ccon);
while (OraclerRD.Read())
{
VaAmountPaid = OraclerRD[0].ToString();
}