sql - DataAdapter.Fill() 'Date' fills as 'DateTime' -


i have sql table contains date field, 'date_14'.

using following, mydatatable creates 'date_14' column datetime:

dim mydatatable new datatable mycommand.commandtext = "select top 0 * " & tablename dim mydataadapter sqldataadapter = new sqldataadapter(mycommand) mydataadapter.fill(mydatatable) 

i have skipped connection string; open/close connection etc. , datatable filled. however, fill() method appears casting 'date' data type 'datetime'.

these sql tables created programmatically , don't want create additional columns store correct data type string around problem; rest of code relies on mapping sql , .net data types each other determine data type.

has come across before? how did around it?

thanks in advance


Comments

Popular posts from this blog

java - Callback from new thread to class from which thread was initiated -

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -