|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HOW TO: Build a Connection String ProgrammaticallyThere is an article on MSDN called: "HOW TO: Build a Connection String
Programmatically in ADO.NET by Using Visual C# .NET" http://support.microsoft.com/default.aspx?scid=kb;EN-US;310083 The article outlines adding refs to MSDASC and adodb to a project in order to interactively generate and test a db connect string. I can't imagine that VS2005 would still be ref'ing older com modules for this. What is the new function? Hi,
there is a DbConnectionStringBuilder base class in .net 2. Database specific classes inherit from it, such as SqlConnectionStringBuilder class. -- Show quoteMiha Markic [MVP C#] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "_DS" <_DS@Nospamforme.com> wrote in message news:vpaps11726udni1dudgs0u1p8dbvj4uqj6@4ax.com... > There is an article on MSDN called: "HOW TO: Build a Connection String > Programmatically in ADO.NET by Using Visual C# .NET" > http://support.microsoft.com/default.aspx?scid=kb;EN-US;310083 > > The article outlines adding refs to MSDASC and adodb to a project in > order to interactively generate and test a db connect string. > > I can't imagine that VS2005 would still be ref'ing older com modules > for this. What is the new function? > On Tue, 17 Jan 2006 10:51:24 +0100, "Miha Markic [MVP C#]" <miha at
rthand com> wrote: >Hi, That's part 2 of what I was trying to recall, but that's the> >there is a DbConnectionStringBuilder base class in .net 2. >Database specific classes inherit from it, such as >SqlConnectionStringBuilder class. string-cat function that assembles the string after individual components are formed. (I had actually written a class that did that, pre-VS2005) The main function that I was looking for is similar to VS2005's built-in "Add/Modify Connection Dialog Box" but done programmatically. In other words, the user of my program would have the equivalent of the Visual Studio Connection Wizard. Again, I had done this with VS2003 by using the COM module that I had mentioned, but I do believe there is a .NET version now. That would be nice, as VS2005 does not like the COM module much. ....and probably Ah, I see.
I don't think that there is anything like that (UI) out of the box but nothing prevents you from updating your existing code...(mostly you would have to comment it out) -- Show quoteMiha Markic [MVP C#] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "_DS" <_DS@Nospamforme.com> wrote in message news:qn2ss1hc9sundkgsbhruib1o733p5g6bkb@4ax.com... > On Tue, 17 Jan 2006 10:51:24 +0100, "Miha Markic [MVP C#]" <miha at > rthand com> wrote: > >>Hi, >> >>there is a DbConnectionStringBuilder base class in .net 2. >>Database specific classes inherit from it, such as >>SqlConnectionStringBuilder class. > > That's part 2 of what I was trying to recall, but that's the > string-cat function that assembles the string after individual > components are formed. (I had actually written a class that > did that, pre-VS2005) > > The main function that I was looking for is similar to VS2005's > built-in "Add/Modify Connection Dialog Box" but done programmatically. > In other words, the user of my program would have the equivalent of > the Visual Studio Connection Wizard. > > Again, I had done this with VS2003 by using the COM module that I had > mentioned, but I do believe there is a .NET version now. That would > be nice, as VS2005 does not like the COM module much. > > > > ...and probably |
|||||||||||||||||||||||