Re: Using Access with Data Object Connections

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Curt Emich (cemich_at_comcast.net)
Date: 02/25/04


Date: Wed, 25 Feb 2004 12:00:09 -0800


I have another question about this process of getting a connection set
up and then populating a drop-down list box with a query.

I was able to create a connection like you said, and then I created a
data adapter. I then clicked on "generate dataset" and named a dataset
to be created from a query I specified. I get this build error:

"The type or namespace name 'dsStatements' does not exist in the class
or namespace 'TrainOfThought.TrainOfThought' (are you missing an
assembly reference?)"

"dsStatements", of course, is the name of the dataset. "TrainOfThought"
is the name of the application and the namespace and the main class.
The code doesn't seem to generate a dataset object. Instead, I get this
code at the top of the "TrainOfThought" class:

protected System.Data.OleDb.OleDbConnection cnnTrainOfThought;

protected System.Data.OleDb.OleDbCommand oleDbInsertCommand1;

protected System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;

protected System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;

protected System.Data.OleDb.OleDbDataAdapter adaStatements;

protected System.Data.OleDb.OleDbCommand cmdSelectStatements;

protected TrainOfThought.dsStatements dsStatements1;

protected System.Web.UI.WebControls.DropDownList DropDownList1;

The second to last line is the problem. I can't see why it's generated
the way it is. I would expect it to come from System.Data.Dataset, not
"TrainOfThought.dsStatements". Does anyone know what I'm doing wrong
here or how I can work around it?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Building a Dataset with Access
    ... I have another question about this process of getting a connection set up ... and then populating a drop-down list box with a query. ... "The type or namespace name 'dsStatements' does not exist in the class or ... namespace 'TrainOfThought.TrainOfThought' (are you missing an assembly ...
    (microsoft.public.dotnet.framework.adonet)
  • Building a Dataset with Access
    ... I have another question about this process of getting a connection set up ... and then populating a drop-down list box with a query. ... "The type or namespace name 'dsStatements' does not exist in the class or ... namespace 'TrainOfThought.TrainOfThought' (are you missing an assembly ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Decision Tables
    ... namespace parser{ ... switch ){ ... bool b = expr; ... "See source grammar for query syntax\n" ...
    (comp.programming)
  • Re: Simple xpath query with default namespace
    ... query (a prefix that's no actually in the xml) in order for the library ... whether it's the default namespace. ... then when you have your XPath query you will need to tell XPath which Account ...
    (microsoft.public.dotnet.languages.csharp)