Re: invoke ado connection wizard at runtime C#

Tech-Archive recommends: Fix windows errors by optimizing your registry



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?


.



Relevant Pages

  • Re: Access 2003-Access 2002 Incompatibility
    ... Microsoft ActiveX Data Objects Recordset 2.7 Library ... The first one corresponds to msado15.dll (and adds the ADODB reference), ... There are two ADO type libraries. ...
    (microsoft.public.access.conversion)
  • Re: Missing reference library
    ... By not checking the reference ... Microsoft ActiveX Data Objects 2.5 and this worked fine. ... Animation Carbon: Copy/Paste/Share animation libraries. ...
    (microsoft.public.powerpoint)
  • Re: Missing reference library
    ... Animation Carbon: Copy/Paste/Share animation libraries. ... On another machine I am missing ... the reference library to Microsoft ActiveX Data Objects 2.8 Library. ...
    (microsoft.public.powerpoint)
  • Re: vb6 access 97 to 2003 upgrade
    ... You have a smorgasbord of libraries, ... Excel library - which should be Microsoft Excel 11.0 Object Library to match ... Microsoft ActiveX Data Objects 2.5 Library ...
    (comp.lang.basic.visual.misc)
  • Re: Installable iSAM
    ... Microsoft DAO 3.6 object library ... microsoft activex data objects 2.5 library ... and ADO libraries. ...
    (microsoft.public.vb.general.discussion)