11-13-2012 02:35 PM
Hello database savy people,
I have read the records in from an existing *.accdb file and wish to write them to a *.sql file. How do I create a local sql database file with LabVIEW Conectivity toolkit so that I may use DB Tools Open Connection to obtain a reference and build this file?
Thanks,
HLB
11-14-2012 04:18 PM
Hi HLB,
I found this document that has lots of information on the Database Connectivity Toolkit and using SQL databases with it. There's also this example on the community that demonstrates creating a UDL file for building an SQL database.
I hope you find this helpful.
11-15-2012 03:22 PM
To be able to use the DB toolkit you need to have a Databasse server of some kind installed.
And a .sql file is NOT a database in it self. It is a plain text file that can have sql statements writen.
The .sql can be used to execute teh sql statements on a sql server from an admin program.
Why do you thing that you need your data to be in a .sql file ?
11-16-2012 07:55 AM
Thanks dkfire,
I have loaded Microsoft SQL server 2012. When I use DB Tools Open Connection with prompt set to true I can select SQL Server Native Client 11.0, specify (computer name)\SQLEXPRESS as provider, NT security, and an existing database and thus start working with that database. Not sure how this translates into the correct connection information string or dsn/udl file.
My goal is to be able to choose/create whatever type database is required, not just grab the first provider that is on my computer. So, I need to determine database type qualities and select one, find some driver that supports that database, determine the correct syntax to open that database with LabVIEW, develop the database, and then port it to a server for end use.
Any guidence is appreciated.
HLB
11-19-2012 05:03 PM - edited 11-19-2012 05:04 PM
Hey HLB,
The Database Connectivity Toolkit cannot create databases, it can only connect to existing ones. As for programatically determining which database to connect to, that seems like it could be accomplished using case structures and some of the information in the document I posted earlier. Could you provide a sample of your code so I could get a little more context into what might help you?