02-22-2009 09:27 PM
Hello everyone!
I have a question about using LabVIEW DataBase Connectivity Toolkit 1.0.2 that eagerly needs your help. I don't know how to programmaticlly create a new Microsoft Access(.mdb)file (Not a new table in a existing Database)using LabVIEW Database Connectivity Toolkit1.0.2. As you know, usually we can set up the connection by creating a Universal Data Link (.udl) file and inputting the path to the DB Tools Open Connec VI in the LabVIEW DataBase Connectivity Toolkit. However, searching a table within an existing database containing a great many tables is a toilfulif job. If I want to use a new DataBase file with the date and time string as its name to log my acquisition data in each measurement process, how to do? I am sure someone of you must can resolve my question, and thanks very much for your help.
02-22-2009 09:36 PM
The DCT can't do it. Check this link for code that will - as well as some better drivers than the DCT.
Mike...
02-22-2009 09:58 PM
03-01-2009 10:05 AM
I don't know what your real design considerations are here but, from I understand from your post, this is a really bad way to go about the process of logging data -- IF you want to be able to do significant ad hoc or stored procedures analyses after it has been collected. Using separate MDB files for data that ONLY differs by one field (namely that date) is not the most efficient way to organize it. What would be much more efficient would a joined table including the date and a reference ID of some sort for the various measurements that were done. That way your stored procedures for looking at ALL measurements of type X would be very simple going across ALL dates. Making such a comparison across multiple MDB files is a much more challenging process AND doing the original data collection in that way doesn't really gain you anything.
Generally, if something is difficult to do in the DCT (Database Connectivity Toolkit) it's because it's a "not good thing" to do within MDBs. I know that others probably disagree with that but I've worked with Access since it's initial release and other RDBMs prior to that both through compiled tools, Unix scripts, etc. You may, of course, still choose to proceed in the way you've described and that may work excellently for you.