G
Guest
I'm fairly new to C# and I must be misunderstanding something:
I have created a standard web ASP.NET web application project and put data
controls into it. Right at the top is a whole set of 'using' statements put
there automatically by the code generator - for example 'using System' ,and
'using System.Data.
Below that is my class, also with some automaticcaly generated code,
starting with:
protected System.Data.OleDb.OleDbConnection oleDbConnection1;
protected System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2;
etc.
If I modify these to
protected OleDb.OleDbConnection oleDbConnection1;
protected OleDb.OleDbDataAdapter oleDbDataAdapter2;
then the build fails.
Can someone please explain why these need to have System.Data specified,
when this namespace is already specified in a 'using' statement.
I have created a standard web ASP.NET web application project and put data
controls into it. Right at the top is a whole set of 'using' statements put
there automatically by the code generator - for example 'using System' ,and
'using System.Data.
Below that is my class, also with some automaticcaly generated code,
starting with:
protected System.Data.OleDb.OleDbConnection oleDbConnection1;
protected System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2;
etc.
If I modify these to
protected OleDb.OleDbConnection oleDbConnection1;
protected OleDb.OleDbDataAdapter oleDbDataAdapter2;
then the build fails.
Can someone please explain why these need to have System.Data specified,
when this namespace is already specified in a 'using' statement.