Board index » delphi » Using SQL-DMO in Delphi

Using SQL-DMO in Delphi

Hi.

Quote
>How can I benefit from the SQL-DMO in my Delphi project?

Well I haven't done anything with v.7 yet, but with 6.5, its just a
question of going to Project|Import Type Library, selecting the SQLOLE
object library, importing it into your project and then Use-ing it in
your main form's unit.

Quote
>I want to use its objects, but I failed.

A bit more detail wrt how you failed would help. A trivial example
that connects to a server, and selects a database is just

var
  S : _SqlServer;
  D : _Database;

{ ... }

  S := CoSqlServer.Create;
  S.Connect(Edit1.Text,'sa','');
  Caption := 'Connected';

  D := S.Databases.Item('pubs');

{ etc }

Cheers, Martyn

 

Re:Using SQL-DMO in Delphi


Well,

It would be a good start to use the menu: Project/Import Type library and
select the apprpriate .olb or .dll file. Once you have it imported, you will
Create an instance of it, similar to say Excel Automation.

Quote
Javidnia <javid...@hotmail.com> wrote in message

news:861s16$ehe3@bornews.borland.com...
Quote
> SQL Server 7.0 has a library named SQL-DMO which encapsulates some
database
> functionality in an Object Model.
> It implemented in only one DLL named  MSSQL7\Binn\Sqldmo.dll
> I want to use its objects, but I failed.
> How can I benefit from the SQL-DMO in my Delphi project?

Re:Using SQL-DMO in Delphi


SQL Server 7.0 has a library named SQL-DMO which encapsulates some database
functionality in an Object Model.
It implemented in only one DLL named  MSSQL7\Binn\Sqldmo.dll
I want to use its objects, but I failed.
How can I benefit from the SQL-DMO in my Delphi project?

Other Threads