Results 1 to 3 of 3

Thread: Unexplained error in data access code :(

Threaded View

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Unexplained error in data access code :(

    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:
    Code:
    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
    Where csharpdata is the name of the compile C# dll, and the above code is in VB.NET

    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
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width