10-30-2007 06:34 AM
10-30-2007 06:38 AM
10-30-2007 09:31 AM
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
10-30-2007 11:15 AM
10-30-2007 12:08 PM
10-31-2007 06:23 PM
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
11-05-2007 04:38 AM
11-07-2007 08:23 AM
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?
11-07-2007 10:34 AM
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
11-07-2007 10:47 AM
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