LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database id key from logs

Solved!
Go to solution

Hi there,

 

I've been tasked with taking logs from different testers and inserting those log files into a central database.

 

I have been able to split the data that i require out but i am having real issues with creating an ID key. This now i have split the log files into 2 seperate tables.

 

1st table contains the main results (So this has Serial number, test type, unit type, duration, start date/time and status)

2nd table contains the details of the tests performed merged (cocacenated) with the pass / fail result.

The two tables will be linked by this ID.

 

I am trying to achieve this on HeidiSQL (MySQL)

I have setup the ODBC for mysql and its linked to the database. 

 

Below is the sample code im working off of, but i cant get it to work either.

Attempt 1.JPG

 

However whenever i run this i just get syntax errors.

database1.JPG

 

Have i done something daft without realising it? 

 

 

Kind Regards

0 Kudos
Message 1 of 6
(3,071 Views)

Your Array is empty.

 

Also, clean up your block diagram as your wires don't look like they are going to where they are actually going.

0 Kudos
Message 2 of 6
(3,050 Views)

@RavensFan wrote:

Your Array is empty.

 

Also, clean up your block diagram as your wires don't look like they are going to where they are actually going.


Are you OriolesFan now??

0 Kudos
Message 3 of 6
(3,036 Views)

For a few days, since opening day just started.  A couple times I've changed the alias to OriolesFan, but that looks strange looking back at old messages.

 

So I left the alias alone and just changed my icon.

 

Smiley Happy

Message 4 of 6
(3,033 Views)

Thanks for the replies,

 

yeah in the picture the array was empty, but regardless if i put values in i still get that long syntax error. See below

 

attempt 2.JPG

 

Could it have something to do with the columns? As it looks like that array is mentioned in the error "Time of Test, Status", i dont quite understand what the values(?,?,?,?) corresponds too.

 

Kind Regards

Colin

0 Kudos
Message 5 of 6
(3,016 Views)
Solution
Accepted by cwyper88

Looks like that VI does not automatic quoting of string identifiers. Try to add brackets around the column names that contain a space.

 

e.g.

 

[Date of Test]

If you still can change the table definition it would be better though to avoid spaces in column names and other identifiers in databases. Either use CamelCase like you did for SerialNumber or replace the space with an underscore.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(3,004 Views)