Jump to content

DB Tools Get properties error with PostgreSQL


Recommended Posts

I have been using NI's Database Conectivity tools with Sybase and Access database for years, with no problems. I recently have been investegating using PostgreSQL for windows, I did the full windows msi install package downloaded from postgresql.org, and installed with no problems. The pqAdmin III was very intutive and I was able to create a database with a few tables, and insert data into the tables, relativly easy. I created a udl link for the database using the PostgreSQL OLE DB Provider that was part of the MSI install, and was able to open a conection in LabView. Every thing was going well untill I tried a parameterized query, this is were things took a turn for the worst. The following error occured "Error -2147217887 occurred at Conn Get Properties.vi->DB Tools Create Parameterized Query.vi->". The cause of this is, after some investegation, due to the request for the "defaultdatabase" property node. I can easily fix this by modifying the NI VI's either in VI.lib or my own reuse, but I do not like these options. Inside the block diagram of the get DB properties is this comment "DefaultDatabase is not supported (fires an error) for all providers. mspersist is one of these...maybe check provider to filter out these cases. NI did not know what was ment by this note, and there suggestion, (contradicting previous NI good practices recommendations) was to modify there VI's. That was a lot to ask this question; "is there something I can change in the PostgreSQL database configuration, or the OLE DB Provider to fix this error"? I am not a "database guy" I use databases with labview because I found it easier then a lot of ini files.

Link to comment
I have been using NI's Database Conectivity tools with Sybase and Access database for years, with no problems. I recently have been investegating using PostgreSQL for windows, I did the full windows msi install package downloaded from postgresql.org, and installed with no problems. The pqAdmin III was very intutive and I was able to create a database with a few tables, and insert data into the tables, relativly easy. I created a udl link for the database using the PostgreSQL OLE DB Provider that was part of the MSI install, and was able to open a conection in LabView. Every thing was going well untill I tried a parameterized query, this is were things took a turn for the worst. The following error occured "Error -2147217887 occurred at Conn Get Properties.vi->DB Tools Create Parameterized Query.vi->". The cause of this is, after some investegation, due to the request for the "defaultdatabase" property node. I can easily fix this by modifying the NI VI's either in VI.lib or my own reuse, but I do not like these options. Inside the block diagram of the get DB properties is this comment "DefaultDatabase is not supported (fires an error) for all providers. mspersist is one of these...maybe check provider to filter out these cases. NI did not know what was ment by this note, and there suggestion, (contradicting previous NI good practices recommendations) was to modify there VI's. That was a lot to ask this question; "is there something I can change in the PostgreSQL database configuration, or the OLE DB Provider to fix this error"? I am not a "database guy" I use databases with labview because I found it easier then a lot of ini files.

I don't know much about PostgreSQL either, but this might be a time to check out the idea of using SQLite with LabView, and join the LabView SQLite toolkit work we are doing at OpenG.org. You can contact me by PM if you have any questions. The LabView SQLite toolkit is posted in the LAVA forums by following the link below.

http://forums.lavausergroup.org/index.php?...=2570&hl=sqlite

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.