Dear Robert

What you're looking for is:
C:\Program Files\Common Files\System\Ole DB\oledb32.dll

Import the type library, it should be called MSDASC_TLB.

The code you want goes something like:

Uses MSDASC_TLB;

Var
  Con : Connection;
  Dsl : IDataSourceLocator;
begin

  Con := CoConnection.Create;
  Con.ConnectionString := '';

  // Magic
  Dsl := CoDataLinks.Create;
  Dsl.PromptEdit(IDispatch(con)); 
  Dsl := nil;

  // Con.Connectionstring is now customised :)


Stephen

> -----Original Message-----
> From: Robert martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, 23 July 2003 12:58 p.m.
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: ADO
> 
> 
> Thanks JED.
> 
> > Is your only target platform windows?
> 
> Yes, primary platform is Windows, but we had thought we may 
> be able to access the DB on a Linux server (mySQL, Postrgress 
> etc) with appropriate drivers?
> 
> > Can't recall the name of the function off the top of my head but if 
> > you look at the ADO demo it is called in there.
> 
> Great ! will have a look.
> 
> p.s. What do you use now?  or are you just not doing DB anymore?
> 
> 
> Rob Martin
> Software Engineer
> 
> phone 03 377 0495
> fax 03 377 0496
> web www.chreos.com
> ----- Original Message ----- 
> From: "Jeremy North" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Wednesday, July 23, 2003 12:46 PM
> Subject: Re: [DUG]: ADO
> 
> 
> > [EMAIL PROTECTED] wrote on 23/07/2003 10:38:54 AM:
> >
> > > (1) Would ADO be the best option?
> >
> > Is your only target platform windows?
> >
> > > Assuming ADO is the best option.  In design mode when creating a 
> > > connection string a wizard appears that allows simple creation of 
> > > the string based on the drivers on the system. (2) Is 
> there any way 
> > > of 'exposing' this system at runtime so a user can 
> configure their 
> > > own settings ?
> >
> > Can't recall the name of the function off the top of my head but if 
> > you look at the ADO demo it is called in there.
> >
> > > (3) If not do I have to resort to building my own 
> connection string 
> > > generator?
> >
> > Read above!
> >
> > > (4) Are there any likely gotchas I mayrun into?
> >
> > Make sure you have the latest ADO Update (Delphi 6).  
> Haven't heard of 
> > any in D7 although I don't use ADO anymore.
> >
> > > I have stayed away from the dbExpress stuff (which I have 
> not used) 
> > > as I understand this would require DBExpress drivers for each DB 
> > > kind.
> >
> > True.
> >
> > JED
> >
> >
> >
> > This email and any files transmitted with it are confidential and 
> > intended solely for the use of the individual or entity to 
> whom they 
> > are addressed. If you have received this email in error 
> please notify 
> > the [EMAIL PROTECTED]
> >
> > 
> ----------------------------------------------------------------------
> > ----
> -
> >     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
> >
> 
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED] 
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> 
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to