Database options for application that needs to retrieve information

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
rslaav
Posts: 25
Last visit: Sat Oct 01, 2022 6:11 am
Has voted: 2 times

Database options for application that needs to retrieve information

Post by rslaav »

Product, version and build: Latest as of Aug 2021, Full DevOps suite.
Operating system: Windows 10

Hi everyone, I am trying to build a script or at least a set of scripts with a GUI frontend that essentially needs to pull information from a database. This database can be on the same system, or possibly online. What I am trying to build is a security policy maker that requires various pieces of data that do not need to be part of the application. My thoughts at first were to use access as it could be pulled from a different machine on the network, but then I thought why not make something available to everyone and have a database online by using something like a db as a service.

SQL might be a little convoluted for me, and I was thinking of using MongoDB. Is this possible? If there are other options, please let inform me, as this is my first time trying to use the software for anything database related. I have a license for the DevOps package, so I have access to the whole suite of Sapien software.
User avatar
brittneyr
Site Admin
Posts: 1649
Last visit: Mon Mar 18, 2024 1:47 pm
Answers: 38
Been upvoted: 30 times

Re: Database options for application that needs to retrieve information

Post by brittneyr »

As long as the connection can be established for your MongoDB database, you should be able to do this.
As for establishing this connection in Product, neither PrimalSQL or PowerShell Studio are tested against MongoDB, but I believe you could connect via the ODBC option.
Once the connection and sql work, you can export the script to a query form from PrimalSQL:
PQL_ExportToPSF.png
PQL_ExportToPSF.png (38.99 KiB) Viewed 43011 times
From PowerShell Studio, you can generate q query form from the Database pane in the Object Browser panel:
SPS_GenerateQueryForm.png
SPS_GenerateQueryForm.png (37.49 KiB) Viewed 43011 times
Though the GUI generated may not be exactly what you are looking for, it should be a good starting point as it generates the necessary code to display database information in a GUI.

You may find the following article helpful:
https://reszolver.wordpress.com/2017/01 ... owershell/

Also, PowerShell Studio (5.8.192) recently was updated to support running sql files.
Brittney
SAPIEN Technologies, Inc.
rslaav
Posts: 25
Last visit: Sat Oct 01, 2022 6:11 am
Has voted: 2 times

Re: Database options for application that needs to retrieve information

Post by rslaav »

Awesome, that's a perfect starting point for me. I will likely use mongodb as a cloud service to start as they have this tool to help you view the collections neatly. I am hoping I won't have to install mongodb drivers to connect, but if so I suppose I'll need to add it to what I am building. Thank you :)
This topic is 2 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.