How to return datatable in VB.net -



How to return datatable in VB.net -

i new vb.net.

i got task upgrade website vs 2008 vs 2012. appreciate if help here. have posted code, don't understand dbaccess in that, , because of that, getting many errors

imports system.data imports authenciate imports scheme imports system.io imports system.text imports system.data.sqlclient public class functions enum enumtype eproject enonproject end enum enum enumtimeformat hh_mm_ss hh_mm end enum public function crosstabcustomerwise(byval fromdate string, byval todate string, byval deptid long, optional byval empcode string = "") object dim strsql new system.text.stringbuilder '= "select * t3_viewsummary logdate between " & "'" & fromdate & "' , '" & todate & "' " dim strquery new system.text.stringbuilder 'strquery.append(" select client t3_forcrosstable ") strquery.append(" shiftdate between ''" & fromdate & "'' , ''" & todate & "'' ") if empcode <> "" strquery.append(" , empcode = ''" & empcode & "''") end if if deptid <> 0 strquery.append(" , deptid = " & deptid & " ") end if strsql.append(" exec t3_crosstab ") strsql.append(" ' ") strsql.append(" select client t3_forcrosstable ") strsql.append(strquery) strsql.append(" grouping client order client ', ") strsql.append(" 'sum((hrs * 60) + mins)', 'substring(cast(shiftdate varchar(20)),1,11) ', ") strsql.append(" '") strsql.append("(") strsql.append(" select customer,shiftdate t3_forcrosstable ") strsql.append(strquery) strsql.append(")") strsql.append("t3_forcrosstable") strsql.append("' ") homecoming (new dbaccess).returndatatable(strsql.tostring, strconnasadmin) end function

vb.net

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -