Hey everyone,

I'm having a few issues using my DLL Assembly.

When I run the following code in VS2005, it works without a drama

Code:
void SelectDefaultActivityCodes(string Search) {

        string _sql = @"SELECT DISTINCT ACC_COMP3, ACC_COMP3_DESCR1, ACC_COMP2, 
	                    ACC_COMP2_DESCR1 FROM GLF_LDG_ACCT_DESC1 WHERE CHART_NAME = 'GLCHART' AND
                        ACC_COMP3 <> '' AND ACC_COMP3_DESCR1 <> '' AND 
                        GLF_LDG_ACCT_DESC1.ACC_COMP3 LIKE '" + Search + "%' ORDER BY ACC_COMP3 ASC";

        DataAccess _da = new DataAccess(_ciProdConnectionString);
        DataSet _ds = _da.ReturnDataSet(_sql);
        int _rows = _ds.Tables[0].Rows.Count;
        
        Response.Write("<table style=\"border:0px;\" cellpadding=\"0\" cellspacing=\"0\">");
        
        for (int i = 0; i < _rows; i++) {

            string _bgcolor = "#FAFAFA";
            int _rowColor = i % 2;
            if (_rowColor == 1) {
                _bgcolor = "ECEEF1";
            }
            
            Response.Write("<tr class=\"SelectCodeItem\" style=\"background:" + _bgcolor + "\">" + Environment.NewLine);
            Response.Write("<td onclick=\"populateActivityCodeTextbox(this.innerText, 'txtActivityCode', 'ActCodeSuggest', '" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP3"].ToString()) + "', '" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP3_DESCR1"].ToString()) + "', '" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP2"].ToString()) + "', '" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP2_DESCR1"].ToString()) + "');\" style=\"padding-left:4px;text-decoration:underline;width:40px;cursor:pointer;border-bottom:1px solid #CED2D5;\">" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP3"].ToString()) + "</td>" + Environment.NewLine);
            Response.Write("<td style=\"width:280px;border-bottom:1px solid #CED2D5;\">" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP3_DESCR1"].ToString()) + "</td>" + Environment.NewLine);
            Response.Write("<td style=\"width:40px;border-bottom:1px solid #CED2D5;\">" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP2"].ToString()) + "</td>" + Environment.NewLine);
            Response.Write("<td style=\"width:160px;border-bottom:1px solid #CED2D5;\">" + Server.HtmlEncode(_ds.Tables[0].Rows[i]["ACC_COMP2_DESCR1"].ToString()) + "</td>" + Environment.NewLine);
            Response.Write("</tr>" + Environment.NewLine);
        }

        Response.Write("</table>");
        _ds.Dispose();

    }
however, when i try to run it through iis, i get an NullReference error on the 'int _rows = _ds.Tables[0].Rows.Count;' line.

Now, I am assuming this is because the ReturnDataSet function is not executing properly, due to problems referencing my InvoiceRequest.Core assembly... (using InvoiceRequest.Core is present)..

It is a strong named assembly, and added to the GAC. the reference is added to my web.config file, and it makes no difference is the DLL file is in the Bin directory of my website or not.

any help would be great.

Cheers,
Justin