LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

creating a *.mdb file using CVI

How can we create a *.mdb file ( microsoft access ) using CVI labwindows

0 Kudos
Message 1 of 7
(4,555 Views)
I use NI's SQL-toolkit (looks like old stuff but still works with CVI 😎 to make dbf-files. It should also be possible to make mdb Access files with this toolkit I think...
0 Kudos
Message 2 of 7
(4,540 Views)
 I have Labwindow/CVI sql tool kit. But i don't know the procedure for making a *.mdb
using that.
0 Kudos
Message 3 of 7
(4,524 Views)
Hello,

The SQL Toolkit does not have a function to create an .mdb file, but you can use Access's ActiveX interface to execute Access functions from CVI. You will first need to create an ActiveX Controller in CVI by going to Tools -> Create ActiveX Controller, selecting Microsoft Access 9.0 Object Library (or whichever version you have) from the ActiveX Server list and specifying a .fp file.

For information and documentation on Access methods please refer to this link on MSDN and select VBA Language Reference -> Microsoft Access Visual Basic Reference.

Good luck with your application and best regards,
Shakhina P.
Applications Engineer
National Instruments


Message 4 of 7
(4,474 Views)

Shahina,

Thanks for your input. I created activex controller in CVI as you mentioned. I checked the visual basic reference.

It mentions as below on creating database file

strDB = "C:\My Documents\Newdb.mdb"
    ' Create new instance of Microsoft Access.
    Set appAccess = _
        CreateObject("Access.Application.9")
    ' Open database in Microsoft Access window.
    appAccess.NewCurrentDatabase strDB
    ' Get Database object variable.

Since i have to write the same in CVI C, What are the corresponding functions i should use in CVI C for the same purpose? Also can you give me some references on the other api's i can use.

Sanju

 

0 Kudos
Message 5 of 7
(4,461 Views)

You will need to refer to the Access VBA heklp to find out more about the method and properties. See this link for more information about using the CVI activeX controller wrappers and how to use the corresponding VBA help.

Bilal Durrani
NI
0 Kudos
Message 6 of 7
(4,426 Views)
wow... Bilal
 The link which you gave me was too good. Now i am able to make the mdb file.
Thanks a lot ...
 
Sanju
0 Kudos
Message 7 of 7
(4,421 Views)