Re: invoke ado connection wizard at runtime C#
- From: "Stephany Young" <noone@localhost>
- Date: Wed, 3 Jan 2007 18:00:56 +1300
You need to add references to both of these COM libraries:
Microsoft ActiveX Data Objects 2.8 Library
Microsoft OLEDB Service Component 1.0 Type Library
If you want to generate a new connectionstring:
public string NewConnectionString()
{
object _con = null;
MSDASC.DataLinks _link = new MSDASC.DataLinks();
_con = _link.PromptNew();
if (_con == null) return string.Empty;
return ((ADODB.Connection)_con).ConnectionString;
}
If you want to modify an existing connectionstring:
public void ExistingConnection(ref string connectionstring)
{
MSDASC.DataLinks _link = new MSDASC.DataLinks();
ADODB.Connection _con = new ADODB.Connection();
_con.ConnectionString = connectionstring;
if (_link.PromptEdit((object)_con))
{
connectionstring = _con.ConnectionString;
}
}
"Jack Wasserstein" <JackWasserstein@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:EB354E06-4073-4185-A65C-3EA56104311D@xxxxxxxxxxxxxxxx
Is it possible to invoke this wizard at runtime, using c#, if so how?
.
- Prev by Date: Re: VB.net and ASP.Net Typed Datasets
- Next by Date: Re: VB.net and ASP.Net Typed Datasets
- Previous by thread: Re: VB.net and ASP.Net Typed Datasets
- Next by thread: Re: invoke ado connection wizard at runtime C#
- Index(es):
Relevant Pages
|