A Wrapper Class for the SQL Server Based Data Access Helper - Adding a wrapper to execute SQL statements
(Page 6 of 7 )
The following is the wrapper method used to execute SQL statements:
PublicOverloads Sub SQLExecute(ByVal strSQL As String)
Try
ObjLib = getDBHelperObject()
ObjLib.SQLExecute(strSQL)
Catch ex As Exception
Throw ex
Finally
Try
System.EnterpriseServices.ServicedComponent.DisposeObject(ObjLib)
Catch ex As Exception
End Try
End Try
End Sub
To deal with BLOB values, you can overload the wrapper method above as follows:
PublicOverloads Sub SQLExecute(ByVal strSQL As String, ByRef BLOBColNames() As String, ByRef ByteArrayObjects() As Object)
Try
ObjLib = getDBHelperObject()
ObjLib.SQLExecute(strSQL, BLOBColNames, ByteArrayObjects) 'contains reference parameters to return back BLOBS
Catch ex As Exception
Throw ex
Finally
Try
System.EnterpriseServices.ServicedComponent.DisposeObject(ObjLib)
Catch ex As Exception
End Try
End Try
End Sub
Next: Adding miscellaneous wrapper methods >>
More MS SQL Server Articles
More By Jagadish Chaterjee