Public function MaxID(ColName as String, Table as String) as long
' Here i make a local Variable Dim recset as ADOB.Recordset
set recset =Conec.Execute("Select max(" & Colname & ")+1 as maxno from " & table end if Set recset= Nothing End Function
Public function MaxID(ColName as String, Table as String) as long
' Here i make a local Variable Dim recset as ADOB.Recordset
set recset =Conec.Execute("Select max(" & Colname & ")+1 as maxno from " & table end if Set recset= Nothing End Function
The ADODB Library was replaced with the ADO.Net Library in .Net. So too move ahead quickly i suggest to use a helper class which nearly will be the same as in ADODB I suggest to find a helper class like Using SqlHelper class in ASP.Net Tutorial with examples in C# and VB.Net