Add settings connection string to an existing Dataset

Scenario / Solution

Existing project with no settings file and related connection string

Do not start by creating the settings file. Instead start with the dataset.

Configure an existing table and retreat back through the wizard to:

“Do you want to save the connection string to the application configuration file?”

Tick Yes and give it a name.

This will generate the settings files and the app.config, but will also generate a lot of errors. The errors include

“‘et’ is not declared. It may be inaccessible due to its protection level”

“‘ype’ is not declared. It may be inaccessible due to its protection level”

Save and close the dataset. You then get additional errors:

“‘conStrApplication’ is not a member of ‘<namespace>'”

Navigate to the first error “‘ype’ is not declared…”

and after “Public ReadOnlyProperty conStrApplication() AsString” type a return and delete. This should clear all errors.

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: