Jump to content
guarasemini

Any tip with Datasnap Rest ISAPI + TDataModule

Recommended Posts

Hi.
I really dont have an ideia what happen.

I have a datasnap rest application - windows - ISAPI dynamic link library. Setting: server methods class, simplified dispatcher and server module. Use TDSServerModule.

As soon I saved and add on IIS, no problem, I "see" reverse string. But, if I add a TDataModule on that project, note...a dataModule without any component, and update my dll on IIS, just broke everything.

I have 3 other applications with those configuration, but if i trie on D 11.2 and adding a dataModule, just broke. If I open an old project, build and update my IIS, its work.

So, could someone give a tip how create a rest isapi application and add a dataModule and not crash ?

Tks for all
Best regards

Share this post


Link to post

The server methods unit is where you would normally put your data access components and anything else needed to handle a request. 

 

Why are you trying to add a TDataModule? 

Share this post


Link to post
2 hours ago, guarasemini said:

just broke everything

This description is too vague. Please be specific about what the issue is, e.g. provide exact error messages. Are you able to create a reproducible example?

Share this post


Link to post

I doubt any of your other projects has an added auto created datamodule. Perhaps an added datamodule instanced in one of the other units if splitting things up was desired vs everything in the Server Methods unit. 

 

This type of project is inherently multithreaded and creates multiple instances of the Server Methods objects to handle multiple requests - tossing in a extra single instance of a datamodule not attached to any of the other units setup for this seems likely to break things period. 

 

So why are you adding an auto created datamodule? 

Edited by Brian Evans

Share this post


Link to post

usually i use a TDSServerModule and add a TDataModule but, I have other applications with that configuration and only new projects when i add a datamodule just crashed.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×