Jump to content

Search the Community

Showing results for tags 'com'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. Hello, I am using Delphi 10.4.2. There is a type library that can be accessed using COM. I can import it and use some parts like login, disconnect, version. There are other parts to do database operations and it seems Delphi has problems using those parts of it. 1- No interface retrieved var LQuery: IQuery; begin LQuery := FMainConnection.NewQuery(); // Here LQuery still remains as nil end; 2- Access Violation var LInvoice: IData; LInvoiceLines: ILines ATime: OleVariant; begin LInvoice := FMainConnection.NewDataObject(doSalesInvoice); try LInvoice.New(); LInvoice.DataFields.FieldByName('TYPE').Value := 8; LInvoice.DataFields.FieldByName('NUMBER').Value := 'L0129002'; LInvoice.DataFields.FieldByName('DOC_NUMBER').Value := 'L0129002'; LInvoice.DataFields.FieldByName('AUXIL_CODE').Value := 'AUTO'; LInvoice.DataFields.FieldByName('DATE').Value := '29.01.2022'; FMainConnection.PackTime(12, 12, 12, ATime); LInvoice.DataFields.FieldByName('TIME').Value := ATime; LInvoice.DataFields.FieldByName('ARP-CODE').Value := '320.01.002'; // Here Access Violation raises LInvoiceLines := LInvoice.DataFields.FieldByName('TRANSACTIONS').Lines; However, If I try all of these using Visual Studio C#.NET, everything works. Since this is COM object, codes on both Visual Studio and Delphi are almost identical. Both Delphi and Visual Studio installed on my development computer. They are using same Type Library, same dll files and it is only Delphi fails to use its parts. I wonder if there is some catch to do with Delphi to fix such problems as I am not experienced much using type libraries. Any help is appreciated. Thanks & Regards, Ertan
×