473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HOW TO: Build a Connection String Programmatically

_DS
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...b;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?

Jan 17 '06 #1
3 7055
Hi,

there is a DbConnectionStringBuilder base class in .net 2.
Database specific classes inherit from it, such as
SqlConnectionStringBuilder class.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"_DS" <_D*@Nospamforme.com> wrote in message
news:vp********************************@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...b;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?

Jan 17 '06 #2
_DS
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
Jan 18 '06 #3
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)

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"_DS" <_D*@Nospamforme.com> wrote in message
news:qn********************************@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

Jan 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
6
by: H | last post by:
This is a question that has haunted me for quite some time. if you build a 4 tier database application where the 4th tier is the database server (MS SQL 2000), where do you build the connection...
4
by: Bob Garbados | last post by:
Is it possible to determine the tables, relationships, keys, columns, and datatypes in a database? If so, how? I want to build an app that can connect to a specified sql2000 database and...
0
by: Sankalp | last post by:
Hi, I am tryin to create an internet connection and download a particular file from a specified URL programmatically using VB on a WIN 95 machine. The code that I use is as follows: Private...
5
by: Zlatko Matić | last post by:
Hello. In ODBC Data Source Administrator, there is a tab "Connection Pooling" and option "PerfMon" Enable/Disable. Could someone explain the meaning of the option and how it reflects to Access...
4
by: sydney.luu | last post by:
Hello, I would greatly appreciate if someone can show me how to dynamically build a Repeater with unknown number of columns at design time. I have looked various threads in this newsgroup,...
2
by: Orit | last post by:
Hello . Please find below my questions - I hope some of the ASP.NET experts of this forum will answer to those beginner's questions : My Web site should be able to work with either SQL Server...
5
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
How can I get the list of connection string's keywords available in sqlclient programmatically? I have found the list in here...
2
by: Man T | last post by:
I just wonder what is/are your practices to build the SQL Server connection string? Use object to build the connection string from config file or somewhere?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.