|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Small problem with storing connection stringsI 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. -- Show quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "Simon Harvey" wrote: > 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 > |
|||||||||||||||||||||||