I am using this small data access DLL, written in C# by one of our contractors.
I have attached this to this post.
The usage for this dll is:
Where csharpdata is the name of the compile C# dll, and the above code is in VB.NETCode:Public Class DocketDA Private ReadOnly Property GetSQL() As String Get Dim SQL As String SQL = "SELECT Orders.OrderNo AS DocketNo, Orders.Status, Orders.Description, SubContractor.SubName AS ContractorName " SQL &= "FROM Orders " SQL &= "INNER JOIN SubContractor ON SubContractor.SubID = Orders.SubID " Return SQL End Get End Property Public Function FetchDockets() As DataTable Dim SQL As String = GetSQL Dim SQLAccess As New csharpdata.SQL("Server=aqu_lhcit_dbt01;Database=TestAXA;UID=TestAXAUser;Pwd=TestAXAUser") Dim dt As DataTable = SQLAccess.GetDataTable(SQL) End Function End Class
I have traced the c# code, and cannot for the life of me see where it's going wrong. The code crashes on the line oDataAdapter.Fill and the error is that an object is nothing of null.
But the code create all objects fine...I am confused
Woka



Reply With Quote
