最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

delphi 12 athens - I'm getting an Access Violation Error When Calling DataSnap Server Methods from a VCL Form Embedded i

programmeradmin2浏览0评论

Working on 3-Tier application, I am encountering an Access Violation Error when trying to call DataSnap Server methods from a VCL form embedded within a BPL (Borland Package Library). I’ve been stuck on this issue for some time and I will be more than happy to use some guidance from the community.

I can describe the Problem as follow: I am working on a Delphi application that uses DataSnap to interact with a remote server. The application includes a VCL form that is packaged into a BPL. The form is responsible for calling methods on the DataSnap server using a TSQLConnection and FireDAC related client components to manage data on a SQL Server database tables. Whenever I attempt to invoke a server method from the embedded form, the application throws an Access Violation error.

My Development Environment Details: Delphi Version: RAD Studio 12.1 Athens DataSnap Server: VCL Standalone server Operating System: Windows 11 Database System: MS SQL Server 2008R2 with SQL Server Management Studio v18.12.1

I used and tried a wide spectrum of Debugging Steps but in vain as bellow:

  • Ensured the DataSnap connection is properly initialized and open before calling server methods.
  • Verified that the DataSnap server is running and accessible.
  • Confirmed that the same methods work correctly when called from a standalone VCL application.
  • Checked the BPL project settings for any differences compared to the standalone application.

Despite these efforts, the error persists, specifically when the VCL form is embedded within the BPL.

I would like also to have briefed answers to the following questions:

  1. Could this issue be related to how the BPL handles memory management or runtime packages?
  2. Are there any specific considerations when using DataSnap client components in a VCL form within a BPL?
  3. What additional debugging steps should I take to isolate and resolve this issue?

I would greatly appreciate any insights, best practices, or solutions for addressing this issue. If additional information or code samples are needed, please let me know, and I’ll provide them promptly.

Thank you very much indeed in advance for your help!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论