S
Smith Simson
I am reading the data from database using SqlDataReader.
Here is my code.....
txtCustomerName =
MyDataReader.GetString(MyDataReader.GetOrdinal("CustomerName"))
txtCustomerDOB =
MyDataReader.GetString(MyDataReader.GetOrdinal("CustomerDOB"))
I am getting the "cast" error at the second line.
the reason for this is "CustomerDOB" is a datetime field in SQL server
dataabase.
how to solve this ? How to read different datatype into Text box. I have
smallint, tinyint in my database.
Thanks for your answer.
Smith
Here is my code.....
txtCustomerName =
MyDataReader.GetString(MyDataReader.GetOrdinal("CustomerName"))
txtCustomerDOB =
MyDataReader.GetString(MyDataReader.GetOrdinal("CustomerDOB"))
I am getting the "cast" error at the second line.
the reason for this is "CustomerDOB" is a datetime field in SQL server
dataabase.
how to solve this ? How to read different datatype into Text box. I have
smallint, tinyint in my database.
Thanks for your answer.
Smith