Database
#6
I'd go with bplus's type approach with using a user type to store my data, but I'd arrange my data a little differently.

Type Blood
  Year as Integer
  Month as Integer
  Day as Integer
  Hour as Integer
  Minute as Integer
  Level as Integer
  Comment as string * 255 ' <<< you have to decide a maximum number or characters if you hope to file it using RA*
End Type


Why would I be so much more complex?

For when I needed to reference that data.   The way our data is written out here, we can now do a quick search for what our levels were on certain days/times.

2022-10-11-23-11...  This data would be for October 11th, 2022, at 11:11PM...  This format is easy as heck to sort your data and make it sequential, if that's ever needed.

Most dates are day, month, year, in string format...  If you ever sort your data, it'll make things a mess to work with!  You'll get stuff like:
"01-01-2000"
"01-01-2001"
"01-01-2002"

That'll be a PITA to deal with over time.  Now sure, you could parse that string, strip out the year, month, day, and then sort it so it'd be in a reasonable order...  OR... You could just be certain to structure your data to keep those parts separate and unique to begin with, and save yourself that hassle.  Wink
Reply


Messages In This Thread
Database - by johnno56 - 11-18-2022, 08:44 AM
RE: Database - by mdijkens - 11-18-2022, 09:28 AM
RE: Database - by mnrvovrfc - 11-18-2022, 12:30 PM
RE: Database - by bplus - 11-18-2022, 01:35 PM
RE: Database - by SpriggsySpriggs - 11-18-2022, 02:13 PM
RE: Database - by Kernelpanic - 11-18-2022, 04:31 PM
RE: Database - by CharlieJV - 11-19-2022, 05:05 PM
RE: Database - by SMcNeill - 11-18-2022, 02:17 PM
RE: Database - by mdijkens - 11-18-2022, 02:37 PM
RE: Database - by bplus - 11-18-2022, 03:16 PM
RE: Database - by Kernelpanic - 11-18-2022, 03:38 PM
RE: Database - by johnno56 - 11-18-2022, 08:45 PM
RE: Database - by mnrvovrfc - 11-18-2022, 11:26 PM
RE: Database - by bplus - 11-19-2022, 01:04 AM
RE: Database - by mnrvovrfc - 11-19-2022, 04:59 PM
RE: Database - by bplus - 11-19-2022, 05:58 PM
RE: Database - by johnno56 - 11-19-2022, 08:02 PM
RE: Database - by bplus - 11-19-2022, 08:11 PM
RE: Database - by Pete - 11-20-2022, 06:55 AM
RE: Database - by mnrvovrfc - 11-20-2022, 08:17 PM
RE: Database - by bplus - 11-20-2022, 08:58 PM



Users browsing this thread: 4 Guest(s)