DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp import from Database wrong?

Hi Brad,

sorry..can you delete the previouse upload threads.

Thanks
Achim

0 Kudos
Message 11 of 42
(5,083 Views)
Hi Brad,

sorry..can you delete the previouse upload threads.

Thanks
Achim
0 Kudos
Message 12 of 42
(5,078 Views)

Hi Achim,

Indeed I did send you the wrong application-- woops.  Here is the correct SQL Wizard with the line 12 I mentioned before.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 13 of 42
(5,075 Views)
Hi Brad

many thanks for your new SQL Wizard (!!wow!!!). This works very well. But i have problems with my tablenames. This has xxx$xxx included wich is a wrong object in VB

==>--- 30.10.2007 16:23:01 ----------------------------------------------------------------------------------------------------------------------------------------------------------

Ungültiger Objektname 'Wt$WMSWINLC$Logger$Test'. : SELECT COUNT(WsTID) FROM Wt$WMSWINLC$Logger$Test

Thanks
Achim
0 Kudos
Message 14 of 42
(5,075 Views)
Hi Brad,

with the new SQLWIZARD i can import my Datetime (WsDateTime) with a increment of 10 ms. But the import of a INT64 is still a problem. Now now ERROR-BOX comes up however the values are 0 (see columns WsTID and WsDateTimeTicks)
Thanks
Achim
0 Kudos
Message 15 of 42
(5,069 Views)

Hi Achim,

For your data base, what is the string character that you can use to wrap the data table and column names?  In Access it is a double quote ("), in some other cases a single quote(') or an accent (`).  In the same line that you typed in your ADO string (12), there are a couple of other parameters, one of which is the string character-- type in the right character for your data base with no surrounding quotes (look at the lines above 12 for examples).  Let me know if this sidesteps the table error with the "$" problem.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 16 of 42
(5,063 Views)
Hi Brad,

the problem is not the name. For example the wizard give me the following error message:

--- 05.11.2007 11:26:43 ----------------------------------------------------------------------------------------------------------------------------------------------------------
Ungültiger Objektname 'Wt$WMSWINLC$Logger$Test'. : SELECT COUNT(WsTID) FROM Wt$WMSWINLC$Logger$Test

--- 05.11.2007 11:26:41 ----------------------------------------------------------------------------------------------------------------------------------------------------------
Ungültiger Objektname 'Wt$WMSWINLC$Logger$Test'. : SELECT COUNT(WsTID) FROM Wt$WMSWINLC$Logger$Test

The same comand
SELECT COUNT(WsTID) FROM Wt$WMSWINLC$Logger$Test
in the Microsoft Sql-Server ManagementStudio has the same Error>:
>>>Meldung 208, Ebene 16, Status 1, Zeile 1
>>>Ungültiger Objektname 'Wt$WMSWINLC$Logger$Test'

But if I change the table name fully qualifies to database.schema.tablename it works in sql-studio....

this works: SELECT COUNT(WsTID) FROM womisadb.mda.Wt$WMSWINLC$Logger$Test

Can i explizit set up or edit my own SQL comand?

Have you a workaround for my INT64 problem?


Thanks
Achim


0 Kudos
Message 17 of 42
(5,025 Views)

Brad-

First of all, thanks for the script; it's a very user friendly and intuitive interface.  I added our MySQL database to your list of default databases (via ADO connection string) and when I run the script I can see the database just fine.  My problem comes when I select channels and try to load selected data into the data portal.  A window pops up saying "Querying table 1 of 1.  Executing query..."  but immediately after that, a windows error window pops up with the following error message:

 

Error in <SQL Wizard.VBS>(Line: 29, Column: 3):

 

The following error occurred when executing the dialog box SQLBrowser from the SQL Wizard.SUD file:

 

<(Declerations), Line 403>

Type mismatch

Any thoughts?

0 Kudos
Message 18 of 42
(4,981 Views)

Hi Seth,

I'm perplexed, because line 403 of the Declarations in the SUDialog I'm looking at is:

If (z - zLast)*100\MaxLen >= 1 Then

... and there's nothing in that line that could cause a VBS type mismatch error, which is expecting an array when you have a scaler or vice versa or asking for an array dimensionality or size larger than the array has.  I'm attaching the version I'm looking at (this is example has extraordinarily poor version control), please try to run it unchanged first to see if it runs at all.  If it does, then add in your database in line 12.  This example assumes you have DIAdem 10.1 or later, by the way.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 19 of 42
(4,960 Views)

Hi Achim,

I have not yet heard back from R&D on the bigint issue.  I believe they are looking into how the SQL table reader retrieves the data from the data base.  That SQL table reader is written in C++, but it may be coercing those integers to a lower order integer if the receiving variable is not an I64.  In VBScript, for example, you only have variant variables, so the best you could do is coerce the bigint to a DBL, which only gives you 53 bits of resolution, not 64.  Even if the SQL table reader does not coerce the bigint values to a lower order integer, the bigint ==> DBL conversion will occur when the values are loaded into DIAdem, since DIAdem stores all channel values as DBLs.

I noticed in your posted error message that the table name was not surrounded by a " or a ' character, as I suggested trying to configure in your line 12.  Please try that and let me know if that doesn't work.  It is of course possible to use "table.column" syntax, but the example does not do so in all places, and that would require work to consistently implement.  Even when you do so, I have found that you often still need to use characters, depending on the data base and the situation, such as:

"table"."column"
'table'.'column'
"table.column"

... and so on.
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 20 of 42
(4,954 Views)