Jump to content

Created a data table but really struggling to write to them


gazza29

Recommended Posts

Hard to help without seeing your logic so far, but here goes anyway....

The data types you are trying to write to the table must match the data types set-up in the Data Table columns struct.

For the User name and login, logout times, you can use the event tags in the User Access Control struct to detect each time a user logs in or out. There will be some code required to save a "TimeStamp" to each event

The instructions used differ, depending on the type of data table created. If you are using an indexed data table, the easiest way is to use the insert row instruction. The existing data gets pushed down a row and the new data writes to the row number defined in the instruction. If you always insert at row 0, the table acts much the same as a FIFO table, deleting the last row of data(first-in) once the table is full.

To save the table's contents to SD card, use the Store DTI to File instruction. That instructions gives you some options such as whether to overwrite the file, append to the file, row # to start from and whether to create a .csv file, .csv-zip file, .udtf file or all types.

 

  • Thanks 1
Link to comment
Share on other sites

  • NoamM changed the title to Created a data table but really struggling to write to them

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...