cancel
Showing results for 
Search instead for 
Did you mean: 

creating a *.mdb file using CVI

Anonymous
Active Participant

creating a *.mdb file using CVI

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

6 REPLIES 6
Han
Member
Member

Re: creating a *.mdb file using CVI

I use NI's SQL-toolkit (looks like old stuff but still works with CVI 8) to make dbf-files. It should also be possible to make mdb Access files with this toolkit I think...
234
Member
Member

Re: creating a *.mdb file using CVI

 I have Labwindow/CVI sql tool kit. But i don't know the procedure for making a *.mdb
using that.
shahina
NI Employee (retired)

Re: creating a *.mdb file using CVI

Message contains a hyperlink
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


234
Member
Member

Re: creating a *.mdb file using CVI

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

 

bilalD
NI Employee (retired)

Re: creating a *.mdb file using CVI


You will need to refer to the Access VBA heklp to find out more about the method and properties. 

Bilal Durrani
NI
234
Member
Member

Re: creating a *.mdb file using CVI

wow... Bilal
 The link which you gave me was too good. Now i am able to make the mdb file.
Thanks a lot ...
 
Sanju