キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Database id key from logs

解決済み
解決策を見る

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 件の賞賛
メッセージ1/6
3,826件の閲覧回数

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 件の賞賛
メッセージ2/6
3,805件の閲覧回数

@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 件の賞賛
メッセージ3/6
3,791件の閲覧回数

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.

 

スマイリー ハッピー

メッセージ4/6
3,788件の閲覧回数

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 件の賞賛
メッセージ5/6
3,771件の閲覧回数
解決策
受理者 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
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 件の賞賛
メッセージ6/6
3,759件の閲覧回数