11-08-2010 01:10 AM
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...
11-08-2010 03:19 AM
Hi,
Plz send me a solution if someone knows..
Regards,
Nitz..
11-08-2010 04:27 AM - edited 11-08-2010 04:29 AM
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.
11-08-2010 05:16 AM
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..
11-08-2010 06:11 AM - edited 11-08-2010 06:12 AM
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).