08-08-2024 12:12 PM
Hello
I have a demand to integrate my system in LabVIEW with a PostgreSQL database.
The database was created by the company's IT team, and they gave me some information from the bank, such as:
Host
Port
User/Owner
Passowrd
Database
I'm trying to establish communication with the database with this information but I'm not succeeding, can you help me?
08-08-2024 12:14 PM
Can you share what have you done so far ?
08-08-2024 12:17 PM
Here is the VI, with the real data masked
08-08-2024 02:09 PM
connection strings can be found here
08-08-2024 02:29 PM - edited 08-08-2024 02:30 PM
What I do is create a udl file with all the connection info. Do this by going to Tools-->Create Data Link.
Then I wire a path of that file to the input on the Open Connection.vi. This way I can test the connection in the udl interface and make sure I get the "Test connection succeeded" before I go to LabVIEW. Sort of like how you test the VISA connection in MAX before opening it in LabVIEW.
08-09-2024 09:13 AM
@ooth wrote:
What I do is create a udl file with all the connection info. Do this by going to Tools-->Create Data Link.
Then I wire a path of that file to the input on the Open Connection.vi. This way I can test the connection in the udl interface and make sure I get the "Test connection succeeded" before I go to LabVIEW. Sort of like how you test the VISA connection in MAX before opening it in LabVIEW.
As an addendum, the .udl is a simple text file, so you can copy the content and use as Connection string if you don't want to use the file.
08-09-2024 10:51 AM
Well I'll be. It is just a text file. At least the udl tool helps to get the connection string formatted correctly.
08-12-2024 03:48 AM
@ooth wrote:
Well I'll be. It is just a text file. At least the udl tool helps to get the connection string formatted correctly.
Oh yes, that's how i use it. 🙂