Building a Dataset with Access

C

Curt Emich

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top