LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create new database programmatically

Solved!
Go to solution

I am trying to create a new MS Access database to log some results to during a labview program using the datab ase connectivity toolkit.  The examples show how to link and create a new table in an existing database file, but I want to create a new database and tehn insert a new table in it for my logged results.  Any ideas??

0 Kudos
Message 1 of 7
(4,723 Views)
Creating a database is usually a one time operation. Why would you want to do this?
0 Kudos
Message 2 of 7
(4,714 Views)

All I need to do is log to an mdb table for subsequent SQL operations in my labview program. 

0 Kudos
Message 3 of 7
(4,708 Views)

@id wrote:

All I need to do is log to an mdb table for subsequent SQL operations in my labview program. 


And this answer does not answer the question why you need to do this in LabVIEW when creating a database is a one-time only event.

Usually best to do manually since you may want to set permissions and passwords, etc.

 

Also, you will need to create tables in the Access database; otherwise, it is pretty useless.

 

0 Kudos
Message 4 of 7
(4,703 Views)

It isnt a one time event for me.  I have to sanitize/wipe clean the temp folder that it is in after each test run.

0 Kudos
Message 5 of 7
(4,698 Views)
Solution
Accepted by topic author id

Do you have Access installed where you can create a blank MDB file?  If so, you could create one and store it as a template in your program folder.  Copy and paste it when you run your routine and use the Create Table VI in the toolkit to create tables to write to.  It is possible to create tables during an INSERT but you can't control properties of the fields.  The OP in this thread is doing that very thing. (http://forums.ni.com/t5/LabVIEW/Database-connectivity-toolkit/m-p/3046359#M868188)

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 6 of 7
(4,690 Views)
Wait, what do you mean by the "temp directory that it is in"? What is a database doing located in a temporary directory? A database is supposed to be permanent storage for data. You need to basically rethink what you are doing.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 7
(4,649 Views)