LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

access database connectivity

Solved!
Go to solution

I'm happy for that! Smiley Happy I was wondering what could be happening but didn't know where to get my hands on.

 

 

PS If you want to reward somebody with kudos you can click on the yellow star near the user name



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 11 of 18
(3,392 Views)

I blame windows!!!  Now that I have the connection running I am sure I will have more posts!

0 Kudos
Message 12 of 18
(3,380 Views)

I can create a new record, update an existing record.  how do I determine if a record exists?  I have an ID (key) of lets say 12345.  what cvi sql function would I use?

0 Kudos
Message 13 of 18
(3,369 Views)
Solution
Accepted by topic author Joncombat

I'm not so fond on SQL to know a direct command, but I would try with a DBIMmediateSQL (Select * From MyTable WHERE key = '123456') followed by a DBNumberOfRecords.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 14 of 18
(3,364 Views)

ok, last question.  I am trying to delete a record with ID = 12345.  the example given in CVI is not that clear. 

 

my statement is DELETE FROM TABLEX WHERE ID = 12345

 

 

0 Kudos
Message 15 of 18
(3,356 Views)

Unless this is a typo, the correct command should be enclosed in single quotation marks: DELETE FROM TABLEX WHERE ID = '12345'

 

Besides it, you could look at del_rec example that gets installed together with the sql toolkit, that shows both this method and an alternative one using tollkit commands instead.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 16 of 18
(3,332 Views)

I'm up and running.  My issue was a typo in the sql statements.  I am using variables and a Fmt() function to create the string and introduced an error.  To quote the gremlin from bugs bunny, " These blockbuster bombs don't go off unless you hit them "just" right!"

0 Kudos
Message 17 of 18
(3,323 Views)

Oh yeah! SQL is particularly oversensitive to wrong semantics! Smiley Wink



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 18 of 18
(3,313 Views)