Click here to Skip to main content
15,888,233 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi all.....
I am using a mysql query which fetches all columns except Date column. is there any process needed? (in order to get Date Column)
thanks in advance.
Posted

If anyone does have an idea, please post it here: MysqlDateAdapter not fetching `Date` from mysql[^] as I am running out of ideas!
 
Share this answer
 
Comments
tulasiram3975 7-Mar-11 13:22pm    
thanks you for trying .....
MySqlCommand command = GetDatabaseConnection().CreateCommand();
MySqlDataAdapter mda = new MySqlDataAdapter();
DataTable dt = new DataTable();

command.CommandType = CommandType.Text;
string sqlStatement = "select * from table";
command.CommandText = sqlStatement;

mda.SelectCommand = command;
mda.SelectCommand.Connection = GetDatabaseConnection();
mda.Fill(dt);
//Dispose the command object
command.Dispose();

return dt;


This will work for all the types of column
Have you tried like this??

Hope this will help.
 
Share this answer
 
Comments
tulasiram3975 7-Mar-11 13:06pm    
am tried in this way now also but still Date Column Not Coming...
Please Help Me Out
thank you
guys ...
i found solution for my question at last
solution is try using Bound Field it fetchs Date Column thanks who answred my question OriginalGriff
And Saranya1388.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900