LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to delete one row from Database

Hello Labview Wizards,

 

I'm currently trying to implement a delete one row function in my VI, but have been unable to successfully do so.

 

Background Info: Using postgreSQL

Database: 3 columns (user, password, privilege)

2 entries: first entry: (alex, 123, 123) second entry: (mike, 456, 456)

Problem: When i specify to delete entry 'mike' nothing happens. However when i specify delete entry 'alex', it deletes both. What am i doing wrong?

 

I have searched the forums for my inquiry, and found one related at this link: http://forums.ni.com/t5/LabVIEW/how-to-remove-only-one-row-from-the-database-using-labview6-1/td-p/1...

In addition, i did reading on the delete statement from SQL.

I used the code that the user Johan provided (see attached image), modifying it for my database to further test whether delete was working or not. The problem persists using the code that Johan provided. In summation, I tried to delete in my original VI, then tried in a simplified VI, then Johan's code, and they all acted the same way.

0 Kudos
Message 1 of 5
(3,731 Views)

PGSQL doesn't like singular table names. It prefers you use "schema.table", where schema is the name of the schema under which your table exists.

0 Kudos
Message 2 of 5
(3,725 Views)

If i understood you correctly, all i would need to do is input under the table name control: public.clust, where public is my schema, clust is my table name.

 

I specified as per your suggestion the schema.table, but the same error is still occurring.

 

 

0 Kudos
Message 3 of 5
(3,709 Views)
Can you make an indicator on the final query and right click and do '\ codes display'?
0 Kudos
Message 4 of 5
(3,703 Views)

See the attached file.

0 Kudos
Message 5 of 5
(3,699 Views)