LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help needed:retrieving specific data from access for further use

Hi,currently doing my project and quite new to labview here,so do hope that anyone will assist me in my problem=)

 

I've found an example  VI called"retrieving data from access.vi",and it basically opens a access database file and then display all the information onto the display panel.However,I'm not sure where to tap the output of the array so that i can manipulate the data for comparison.

 

The previous VIs I've only been retrieving data from excel file,and then reading it first column,then all the rows,and then proceed to the next column,all the rows,and repeats. 

 

I've attached a file that i think its the output after the VI reads from access itself before being outputted into a table.

 

Hope someone will guide me through=)!!!thanks alot in advance!

0 Kudos
Message 1 of 10
(3,860 Views)

SG,

 I can understand your confusion with that example as it is using some techniques that are confusing to a beginner. Basically the example is writing to a property node of the front panel list box control(item names). Have you run the example with highlight execution mode on and watch the dataflow? (lightbulb on top toolbar)This example is using Dynamic Data Exchange to 'hook' into Access and retreive the information. DDE is an older technology and these days most people use ActiveX instead. Do you perhaps have the DataBase toolkit for LabVIEW? If you do that will make your life easier. If not there are some free code bits available if you search for them.

 

Also your attachment did not make it. When you add an attachment don't preview before you post.

Message Edited by GovBob on 12-10-2009 12:15 PM
Now Using LabVIEW 2019SP1 and TestStand 2019
Message 2 of 10
(3,833 Views)

Hi,

 

I've tried using the highlight execution mode to watch the dataflow.Sadly,i cannot see the dataflow of the subVIs,which i feel is the crictical part.

 

 So for now ,can i conclude that the subVI (Part1.vi),it reads the application(Access),topic(The file path)  and item(Row and column),and then the subVI(Part2.vi) selects the data and then output it into the table?So,can i conclude that in Part1.vi,the "Viewtable part of the case structure " contains the data extracted previously from the other parts of the case structure?I've attached the Viewtable icon expansion VI.Thanks alot for the help!!!!=)!

0 Kudos
Message 3 of 10
(3,808 Views)

eh sorry,but just to add on,basically I'm trying to read data from access database and then store the data into excel spreadsheet .Hope someone can enlighten me.Thanks!

0 Kudos
Message 4 of 10
(3,799 Views)

I don't understand what you are saying. The data is the output of the Spreadsheet String to Array and is what is wired to the table/2D String array indicator.

 

You should really listen to GovBob. The example and DDE are obsolete. Use the LabVIEW Database Toolkit or try LabSQL.

0 Kudos
Message 5 of 10
(3,797 Views)

oh,haha sorry.The reason Im still using DDE is because I have yet to get the Database toolkit.So instead i was trying to use DDE to get my data.Oh ok,I'll try my LabSQl instead=) Thanks!

0 Kudos
Message 6 of 10
(3,788 Views)
Hi,thanks for the advice.i'm using Database toolkit right now,but I can't connect the data to graph for display on the front panel.Hope someone can point out to me ?thanks alot!=)!
0 Kudos
Message 7 of 10
(3,761 Views)
I don't understand what you want to graph. From the picture of the code you have shown you are retrieving from the database 3 strings (First Name, Last Name, Phone number) and customer number and record number. What would possibly be your x axis and y axis? Do you actually want a table?
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 8 of 10
(3,741 Views)
oh dear,sorry sorry.I havent really edit the code yet,cause actually the name,phone etc will become my voltage,current values.So basically I'm trying to connect two of the outputs to a x-y graph,but can't find the data type converter to link the x-y graph icon and the outputs together.
0 Kudos
Message 9 of 10
(3,735 Views)

SG

 Well now that you have the DB toolkit you need a way to 'hook' into it. There are 2 ways that I'm familiar with (and I make no claim to being an expert in DataBases). Create a UDL or DSN. Creating a UDL (Universal Data Link) is rather easy. Just right click on an empty spot on your desktop and choose New>>Microsoft Data Link. Double click on the new data link.On the provider tab select Microsoft Jet 4.0 OLE DB Provider press next and then browse to your database. Make sure you test your connection. Now if it works you are good to go.

 I wish I knew what your LabVIEW version was. Now just open LabVIEW and go to the example finder. Under toolkits and modules select DataBase Connectivity and Get Database Information.vi. Open the block diagram, delete the subvi called

Get UDL.vi (first on the left, Ctrl+H is your friend). Right click on the connection information input of the DB Tools open connection subvi and select create control. Go back to your front panel and use the folder glyph to browse to the UDL you created. Run the vi and you will get information about your database. From there is depends on the structure of you database.

 

Hope this helps.

Disclaimer: I assume you are using windows since you mentioned Access and Excel. According to your reply #4 you wanted to move this data to excel. You can just use the export/import functions of Access/Excel to do this without using LabVIEW.

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 10 of 10
(3,725 Views)