Click here to Skip to main content
15,916,379 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
namespace Company.Project.DataProvider
{
    partial class MyDataSet
    {
        partial class MyDataTable
        {
        }
    }
}
namespace Company.Project.DataProvider.MyDataSetTableAdapters
{
    public partial class MyTableAdapter
    {
        public int CommandTimeout
        {
            set
            {
                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1))
                {
                    if ((this.CommandCollection[i] != null))
                    {
                        this.CommandCollection[i].CommandTimeout = value;
                    }
                }
            }
        }
    }
}


protected void ObjectDataSource1_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
       {
           Company.Project.DataProvider.MyDataSetTableAdapters.MyTableAdapter adapter;
           adapter = (Company.Project.DataProvider.MyDataSetTableAdapters.MyTableAdapter)e.ObjectInstance;
           // Set command timeout to 2 minutes
           adapter.CommandTimeout = 120;

       }

Where is the error

ERROR MESSAGE:<br />
The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?)
Posted
Updated 10-May-11 20:15pm
v5

1 solution

Make sure you have included the assembly for namespace Company.Project.DataProvider.MyDataSetTableAdapters in the project that contains ObjectDataSource_ObjectCreating method.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900