Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7810265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:42:27+00:00 2026-06-02T03:42:27+00:00

Using Delphi XE to build a relatively straightforward database app using Datasnap. Since some

  • 0

Using Delphi XE to build a relatively straightforward database app using Datasnap.

Since some security in my application is handled at the database level, I need to pass a user’s SQL credentials from my client app to my Datasnap server.

(I’m trying to make the Datasnap server stateless if possible, so recognise that I will have to do this for every call.)

I’m using ClientDatasets (CDS) on the client side so I could use OnBeforeGetRecords to pass the data in the OwnerData OleVariant from the CDS on the client to the corresponding TDataSetProvider on the server. But that means every single CDS on every data module has to have an event that does this, which seems messy and unwieldy. I can’t help feeling there must be a way to pass messages to the server at a higher level than that.

What I’d really like is something like this at the DSServerClass level on the server side:

Procedure TMyServerContainer.MyServerClassCreateInstance(DSCreateInstanceEventObject: TDSCreateInstanceEventObject); 
begin 
// Server detects request for data from client app 
fUsername := GetUsernameFromClientSomehow; 
fPassword := GetPasswordFromClientSomehow;

// create data modules and initialise
MyDataModule := TMyDataModule.Create(nil); 
MyDataModule.InitialiseWithSQLCredentials(fUsername, fPassword); 
DSCreateInstanceEventObject.ServerClassInstance := MyDataModule; 
End;

Could the Authentication Manager component help me here? Any other ideas? Or am I stuck with OnBeforeGetRecords?

Many thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:42:31+00:00Added an answer on June 2, 2026 at 3:42 am

    You can use the SQL credentials as UserName and Password for connecting to the DataSnap server. These values can be verified in the Authentication Manager and/or simply forwarded to the underlying SQLConnection component for connecting to the SQL server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to build a quick command line app on my mac using xcode
I am using Delphi 2010 to build a Win32 GUI application running on Windows
I'm a hobby programmer trying to build a client/server application suite, using Delphi XE.
In Delphi 2009, how can I build a project using command line. I tried
I'm trying to automate the build of a project in Delphi 2009. I'm using
Using Delphi XE2 on Win 7 64 bit creating a 32 bit app... In
I'm using Delphi 7 Personal. To access MySQL database I'm using libmysql.dll + very
We are using Delphi 7 to develop database apps with advantage as a backend.
I'm using the line below to have MSBuild build a Delphi 2010 groupproj: MSBuild
In Delphi XE2 the automatically generated build numbers functionality now uses some kind of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.