Small problem with storing connection strings

  • Thread starter Thread starter Simon Harvey
  • Start date Start date
S

Simon Harvey

Hi all,

I have a data access library project within which I have created a
number of datasets.

In one of the datasets I've added a number of strongly typed
datatable/tableadapters and configured them to use a connection string
that has been stored in a settings file.

The problem I'm having is that wehn I open another dataset and try and
create a new table adapter (or modify an existing one) it won't let me
select the connection string that I've already added to the settings file.

It will add another connection string to the same settings file - but it
wont let me use the one I've already added.

Can anyone please tell me how I can get the damn thing to use only one
connection string as this is making deployment an absolute nightmare.

Thanks to anyone who can advise

Simon
 
Not sure, but you can add the file, let it add conn string and then open the
C# file for the DataSet and change to the first connection string.

I have done table adapters in the past and I believe I had it on a single
conn string, without the magic above, but it has been since VS 2005 beta
timeframe, so my memory has faded on how I did it. Apologies.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Hi there,

Thanks for your help.

I've actually tried to do this, but it really seems to piss the designer
off when I try it. Part of the problem is that it adds numerous
references to the dataset code and the xsd file - not to mention the
settings file and the application config file that its taken to adding
to my data access project.

Stupid arse thing. I know I'm prbably doing something wrong - but I
don't think I'm completely thick - so I dont think its self evident why
what I'm doing isn't working.

I'm giving up cos this is really getting on my tits now.

Thanks again for your suggestion though

Simon
 
Back
Top