Bespoke Applications Development Team
_____
Hi All
I have a DAL method that return a typed data set (dsProductCatalogue) from
the SQL database.
When this project is included in my server application, it works fine, but
when I call the same method from within my web service, it does not return
all records, even though the schema returned is correct, and the first
record from the first table is returned.
Can anyone tell me what I'm doing wrong?
DAL Method Signature:
public ProductCatalogueDAL.dsProductCatalogue CreateDataSet(string strConn,
int intDealerID)
WebService:
[WebMethod]
public ProductCatalogueDAL.dsProductCatalogue GetDataSet(string strUsername,
string strPassword)
{
string strConn = ConfigurationSettings.AppSettings["conn"];
SqlConnection conn = new SqlConnection(strConn);
string sql = "SELECT ID FROM Dealerships WHERE Email = '" +
Resin.DataHelper.antiInject(strUsername) + "' AND Password = '" +
Resin.DataHelper.antiInject(strPassword) + "'";
SqlCommand cmd = new SqlCommand(sql,conn);
cmd.Connection.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
ProductCatalogueDAL.User usr = new ProductCatalogueDAL.User();
usr.DealerID = Convert.ToInt32(dr["ID"]);
ProductCatalogueDAL.ProdCatDataAccessor pcda = new
ProductCatalogueDAL.ProdCatDataAccessor();
ProductCatalogueDAL.dsProductCatalogue ds = new
ProductCatalogueDAL.dsProductCatalogue();
ds =
pcda.CreateDataSet("Server=127.0.0.1;uid=sa;pwd=;Database=AW_ProdCats",
usr.DealerID);
return ds;
}
cmd.Connection.Close();
return null;
}
_____
Doug Wilson | Lead Applications Developer | iX Webhouse
iX Headoffice | Umhlanga , South Africa | Mobile: +2783 6412944
Tel: +2731 5669250 | Fax: +2731 5669260 | Email: [EMAIL PROTECTED]
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/