Click here to Skip to main content
15,883,961 members

Comments by mtoha (Top 39 by date)

mtoha 19-Mar-24 23:28pm View    
Where is code when you assign Con object? Is the connection string is correct?

Stop being ridiculous, and paste ex message in exception if any. what does the meaning of NOT WORKING?
mtoha 12-Jun-23 5:35am View    
this style is called cowboy coding.. new style of coding anounced at 1900.
mtoha 12-Jun-23 3:22am View    
change to this:
txtTotal.Text = getTotal("Select ISNULL(sum(convert(decimal, isnull(total_netpay, 0)),0) from emp_payroll where PDate is not null AND DATENAME(week, PDate) = DATENAME(week, getdate()) AND year(getdate()) = year(PDate)").ToString("#,##0.00");
mtoha 12-Jun-23 2:57am View    
Select ifnull(sum(total_netpay),0) from emp_payroll where week(PDate) =week(now()). if that sql above is fine, maybe the error occured at another function not there,
mtoha 12-Jun-23 2:36am View    
when you debug string sql on get total, what is the value of sql string?