vb.net - Dataset from SQL Query Won't Return Time of 00:00 -


i working on web application in vb.net 2008 sql 2008r2 database on end. sending query sql through vb obtain patient's hospital visit information:

select top 1 * visit (nolock) visit_code = '123' , start_date <= '07/17/2012' order visit_code desc, start_date desc 

this returns correct record. however, there hold_start_date_time field defined datetime in database contains both date , time. works great unless time midnight - 00:00.

when run above query directly in sql server management studio field displays correctly. in dataset in vb.net when @ datarow field has date no time @ all. time of other 00:00 populates dataset correctly.

unfortunately, midnight valid time field. there way can appear in dataset?

dim dsdata dataset dsdata = getdataset(strsql, "visit")  if datasetrowcount(dsdata, "visit") > 0     dim drdata datarow     drdata = dsdata.tables("visit").rows(0) end if   public overloads function getdataset(byval strsql string, byval srctable string) dataset dim dadata sqldataadapter  dadata = new sqldataadapter(strsql, strconnectionstring) dadata.fill(dsdata, srctable)  dadata.dispose() dadata = nothing  return dsdata end function 

any appreciated.

i guess time there, not showing because visualizer tool (vs debugger?) don't show if it's 00:00. try dump in html or window proper formatting , fine.


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -