Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing the MS SQL2000 SQL_DMO Type Library

Status
Not open for further replies.

mjrogers

Programmer
Jan 30, 2002
5
0
0
GB
Ladies and Gentlemen.

I attempted to import the Microsoft SQL2000 SQL_DMO type library via the Project->Import Type Library menu option. All appeared to import correctly and the SQLDMO_TLB.pas and SQLDMO_TLB.dcr files were created in the Delphi7\Imports directory.

However when I came to compile the project the following error was generated, Note this was before adding any further code to the project.

[Error] SQLDMO_TLB.pas(12631): Identifier redeclared: 'ID'
[Fatal Error] DMOTrials.dpr(6): Could not compile used unit 'C:\Program Files\Borland\Delphi7\Imports\SQLDMO_TLB.pas'

Looking at the code generated by the Type Library importer I see why. Notice the two properties called ID.

// *********************************************************************//
// DispIntf: _DistributionArticle2Disp
// Flags: (4544) Dual NonExtensible OleAutomation Dispatchable
// GUID: {10033116-E260-11CF-AE68-00AA004A34D5}
// *********************************************************************//
_DistributionArticle2Disp = dispinterface
['{10033116-E260-11CF-AE68-00AA004A34D5}']
property ID: Integer writeonly dispid 14;
property Application: Application readonly dispid 1;
property Parent: _IVSQLDMOStdObject readonly dispid 2;
property UserData: Integer dispid 3;
property TypeOf: SQLDMO_OBJECT_TYPE readonly dispid 4;
property Properties: Properties readonly dispid 7;
property Name: WideString dispid 9;
property ID: Integer readonly dispid 10;
property SourceObjectOwner: WideString dispid 11;
property SourceObjectName: WideString dispid 12;
property Description: WideString dispid 13;
procedure Remove; dispid 100;
procedure BeginAlter; dispid 101;
procedure DoAlter; dispid 102;
procedure CancelAlter; dispid 103;
end;

Has anyone else had this problem? Ory has anyone been able to import this type library successfully?

Some version information follows.

Delphi : Enterprise version 7 Build 4.453
SQL2000 : SQL2000 SP3a
SQLDMO.DLL: File version 2000.80.760.0

Regards


Mark Rogers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top