Skip to content

DLL integration #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
srcarvalho12 opened this issue Apr 28, 2025 · 10 comments
Open

DLL integration #902

srcarvalho12 opened this issue Apr 28, 2025 · 10 comments
Labels
enhancement New feature or request

Comments

@srcarvalho12
Copy link

Would there be any possibility of adding support for connecting to dll libraries? I have a dll made in .NET Standard that would be interesting to integrate with SQLPage.

@srcarvalho12 srcarvalho12 added the enhancement New feature or request label Apr 28, 2025
@lovasoa
Copy link
Collaborator

lovasoa commented Apr 29, 2025

Yes, that is possible! Are you interested by working on this? What does your dll do?

@srcarvalho12
Copy link
Author

The DLL is responsible for issuing tax documents for products in my country. Some companies and stores of all types must issue tax documents for all products sold, so this DLL would help with that.

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 29, 2025

Oh, I see. Then I think you should write a standalone executable that takes command-line arguments, and execute it with sqlpage.exec

@srcarvalho12
Copy link
Author

Indeed, that is an alternative! To capture the output, can I use sdtOUT?

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 29, 2025

Yes!

@srcarvalho12
Copy link
Author

srcarvalho12 commented Apr 29, 2025

Nice! Thanks! I also have another question about private .sql files, for example, I'm creating components inside a folder called components, and inside there will be files like header.sql (responsible for the application's NavBar), so that I don't write it several times on different screens I just add:

SELECT
    'dynamic' As component,
    sqlpage.run_sql('components/_header.sql') As properties;

However, it is possible to access this component through the url with /components/_header.sql and it will appear on the screen.

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 29, 2025

You can put them in the sqlpage/ private directory.

@srcarvalho12
Copy link
Author

Have an exemple? Pls

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 29, 2025

No I don't :) Just put your file in sqlpage/components/_header.sql instead of components/_header.sql.

@srcarvalho12
Copy link
Author

No problem! I thank you from the bottom of my heart!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants