03-02-2006 02:42 PM
03-03-2006 03:10 AM
03-03-2006 09:31 AM - edited 03-03-2006 09:31 AM
Delfino,
As stephan said, it is not a simple thing to use ODBC if you are new to either C or to databases in general. Mostly because ODBC is so old there is not too much reference matrial. However, once you get some experience you will find it is a very robust way to communicate with databases, and you then can create your own DLL's to simulate the NI functionality. If you are new to C or DB's or have never heard of ODBC before, plan on spending a non-trivial amount of time to get to a point where you can get data from a database.
The following link should help to get you started on your quest...
http://www.codeproject.com/database/sqlconnect.asp
The data in the aforementioned link is nominally for using ODBC with SQL Server, but the only difference implementation wise you will see between the two is that you have to use a different connection strings (which is why ODBC rocks!). The following link will provide you with all of the connection stings that you will need.
http://www.simongibson.com/intranet/adoodbc/
The last link here is a good overview of ODBC from MSDN. You will probably need to upgrade your machine (and any other machine you plan on developing ODBC with) with the MDAC 2.8 kit or whatever version it is at now, but once you create a .DLL with your ODBC functions you can just use that and won't have to worry about the extra source files that are needed for developing with ODBC and are included in the current MDAC kit.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcabout_this_manual.asp
Message Edited by DaveC on 03-03-2006 09:32 AM
03-03-2006 09:52 AM
Thanks to both of you Dave and Stephan,
Before I saw your reply I wrote already some code using the MS Access ActiveX controller generated by the CVI wizard. And is working now! Just for future reference the general procedure using activeX was: create a new Access instance, then open the database, create a form, specify the query to the form, insert some controls to the form, display the form and then send query result to a text file.
Thanks again,
Delfino
09-06-2006 04:29 PM
09-07-2006 09:14 AM
Hey DSandoval,
Care to expound on how you were able to open a ms database, and write to a table by creating and using an activeX server?
Thanks,
Zot