function to Get scalar value using asp.net code Public Function getSclarValue(ByVal Qry As String) As String Dim cmdDatabase As New SqlCommand Try cmdDatabase = New SqlCommand(Qry, objCn.openDb()) Return cmdDatabase.ExecuteScalar() Catch ex As Exception MsgBox(ex.Message) Return Nothing Finally objCn.closeDb() End Try End Function Function to Get value of table using query in asp.net Public Function GetTable(ByVal str As String) As DataTable Try Dim dt As New DataTable Dim cmd As New SqlCommand(str, objCn.openDb()) Dim adp As New SqlDataAdapter(cmd) adp.Fill(dt) Return dt Catch ex As Exception MsgBox("Error" + ex.Message) Return Nothing Finally objCn.closeDb() End Try End Function
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.