Advertisement

05.07.2008 at 08:54AM PDT, ID: 23383246
[x]
Attachment Details

error on an id.

Asked by mathieu_cupryk in Programming for ASP.NET, Microsoft Visual Basic.Net, .NET Framework 2.0

I have the following code
 DataSet dsRegion = Region.GetRegions(int.Parse(kv["Country"]));
       

The above needs to be changed to handle a string.


  public class Region
    {
        public static DataSet GetRegions()
        {
            DBAccess db = new DBAccess();
            return db.ExecuteDataSet("prcRegions_SelectAll");
        }

        public static DataSet GetRegions(string countryid)
        {
            DBAccess db = new DBAccess();
            db.AddParameter("@sCountryID", countryid);
            return db.ExecuteDataSet("prcRegions_SelectForCountry");
        }

        public static string GetRegionName(string id)
        {
            DBAccess db = new DBAccess();
            db.AddParameter("@sRegionID", id);
            return db.ExecuteScalar("prcRegions_GetRegionName").ToString();
        }

    }Start Free Trial
[+][-]05.07.2008 at 09:42AM PDT, ID: 21518144

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 09:47AM PDT, ID: 21518198

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 09:54AM PDT, ID: 21518268

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 09:56AM PDT, ID: 21518281

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, Microsoft Visual Basic.Net, .NET Framework 2.0
Sign Up Now!
Solution Provided By: jcoehoorn
Participating Experts: 1
Solution Grade: B
 
 
[+][-]05.07.2008 at 09:56AM PDT, ID: 21518288

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628