LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I can't receive data's from database

Hi friends,

 

I have a database file, in that, Table consist of three columns (namely ID, Name, Sno). Using the DB toolkit I read the database and then I convert variant to data. Data type which I preferred is Array of clusters. But as a output, I dint get the database values into array of clusters. I don't know why ??? During the time when I build the database using MS access, for every column I alloted a specfic data type to them. But still its Ignoring....  Can Anyone suggest what could be the problem ????? Please find the attachment below

Download All
0 Kudos
Message 1 of 8
(3,202 Views)

Hi vij@y,

  Even i created a small MS Access database and here is the way i created a small vi to read the whole data from it..

  ReadDatabase.png

 

and my database looks very similar to the database picture you attached.

 

For more help please go through the examples,you will know more.

 

Regards,

SrikrishnaNF

 

 

Regards,
Srikrishna


0 Kudos
Message 2 of 8
(3,190 Views)

@srikrishnaNF wrote:

Hi vij@y,

  Even i created a small MS Access database and here is the way i created a small vi to read the whole data from it.

 

and my database looks very similar to the database picture you attached.

 

For more help please go through the examples,you will know more.

 

Regards,

SrikrishnaNF

 

 



Hi srikrishnaNF,

 

Good to see u again.Smiley Wink Actually U misunderstood me. I need array of clusters as output, Not 2D array of STRINGS. Even I can get 2D array of strings as output if i connect 2D array as a type to variant to data conversion. I assgined different data type for all the columns, So I am expecting the same data types as outputs. That's why I m sticking with clusters,.... 

0 Kudos
Message 3 of 8
(3,175 Views)

HI Vij@y,

  Whatever data type you assigned to the fields in database,the VI i attached  will return as 2-d array .It is upto you how you can parse that array into an array of clusters as per your requirement.

 

Regards,

SrikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 4 of 8
(3,120 Views)

Instead of the double loop variant to string, try a 1D array of cluster like in the attached picture. Just set the array to Cluster to the correct size.

/Y

Convert from database.png

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 8
(3,104 Views)

HI Yamaeda,

 

I have exactly replicate what you showed in the picture. But still the problem exist ! When I connect a 1D array of cluster with appropriate datatype values, the input variant wire became broken. Even I hav adjust the array size, but It showing some error. Once again go through with my attached VI and suggest please.

0 Kudos
Message 6 of 8
(3,093 Views)

Vij@y wrote:

HI Yamaeda,

 

I have exactly replicate what you showed in the picture. But still the problem exist ! When I connect a 1D array of cluster with appropriate datatype values, the input variant wire became broken. Even I hav adjust the array size, but It showing some error. Once again go through with my attached VI and suggest please.


Then you haven't replicated it exactly. 🙂

I dont connect a 1D array of clusters, i connect a cluster and build an array.

The 1st array was to test and generate some data for the 2D variant array.

(I cant open that VI version from here)

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 8
(3,087 Views)

Tell me the compatible version, I ll convert and attach the VI.

0 Kudos
Message 8 of 8
(3,037 Views)