LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating data in MS Access

Hi all,

 

In my program I am sending an array of clusters into an MS access database table using the database connectivity toolkit. What I want to do is, I want to update a particular row in the table or being precise, to update an element of the cluster array. I have checked the examples and seen how to update all columns but there is no information about updating an entire row.

 

I would be grateful if someone can help me on this. 

 

Regards,


Nitz...

0 Kudos
Message 1 of 5
(2,747 Views)

Hi,

 

Plz send me a solution if someone knows..

 

Regards,

 

Nitz..

0 Kudos
Message 2 of 5
(2,739 Views)

Hi Nitzy,

 

I'm not sure I understand your question, but here's my interpretation: You want to update some/all elements of a single record in your database. You do this using the DB Tools Update Data VI; you don't need to worry about the array of cluster after you've INSERT-ed the data.

Perhaps you could post the code that's giving you the trouble.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

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

Hi Jcarmody,

 

Thanks for your timely response. You have interpreted my problem correctly. The only thing is that, I want to specify the location (row) into which i want to update the elements. I have attached all my vis here. i am creating a table and entering some data using the db1.vi and then fetching the data from the database and editing it using the dbfetch.vi. In the second vi i need help in updating the elements in the control to a particular row in the table, say 5th row. Can you tell me how to do it..??

 

Hope i made it clear this time..:)

 

Regards,

 

Nitz.. 

0 Kudos
Message 4 of 5
(2,723 Views)

You need to specify a condition that uniquely identifies the row you want to update; I selected the Name field.  You also should tell the UPDATE function which fields you want to update (not required - read the Help for the Data terminal).  I converted your array to a cluster and changed your Variant to Data from nested For Loops to use a 2D Array of String as shown in the second snippet (not necessarily better, just neater).

 

dbfetch_BD.png dbfetch_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 5
(2,715 Views)