10-31-2007 07:28 AM
11-01-2007 08:09 PM
Hi Gert,
Follow the below URL to a post I made a few days ago with an "SQL Wizard" application for DIAdem. There is no way in DIAdem 10.2 or before to run a real query from the NAVIGATOR-- to do that you need to run a script. The "SQL Wizard" application spares you the hassle of programming the VBScript yourself.
http://forums.ni.com/ni/board/message?board.id=60&message.id=7431
Let me know if you have questions,
Brad Turpin
DIAdem Product Support Engineer
National Instrunts
11-05-2007 08:17 AM
11-06-2007 08:50 AM
Hi Gert,
If you scour that referenced post, you should find in there somewhere the instruction to edit line 12 of the SQL Wizard script, so that your data base info is in that program, either instead of or in addition to the sample data bases that are included with the application. For an Access data base you can just insert the file path, but for all other data bases you need to enter the ADO connection string for your data base.
Ask if you have further questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-07-2007 10:24 AM
(Sorry in advance for the duplicate message)
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-08-2007 08:41 AM
Hi All,
My next answer to this question is in the following post:
http://forums.ni.com/ni/board/message?board.id=60&message.id=7431
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-22-2010 03:59 AM
Hi Brad,
How to use the "SQL Wizard" application? I have a sql 2005 DB and I would like to interact with him using Diadem... I saw the post and I downloaded the sql wizard but I am not able to add my DB to the other exemples... I add the following sentence ("DBs = AddDB(DBs, " VM | | | | # | " & AutoActPath & "VM_sist") at the line 12 of the sql wizard 101.vbs (VM_sist is my sistem DSN file) but I cannot see my db...
could you suggest me something?
thanks,
Michela
02-22-2010 11:20 AM
Hi Michela,
The file path option is only for Access *.mdb data base files, otherwise you have to provide the full ADO connection string in that spot-- this is what line 14 was trying to describe. Here's what it should look like with your DSN:
DBs = AddDB(DBs, " dbDSN | | | | # | DSN=VM_sist;UID=_____;PWD=_____;")
You need to insert your actual user ID (UID) and password (PWD) values for your data base above. If they happen to be empty, then you can use the following expression:
DBs = AddDB(DBs, " dbDSN | | | | # | DSN=VM_sist;UID=;PWD=;")
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-24-2010 03:55 AM
Hi Brad,
Thanks so much for your reply!
I loaded my db in the wizard! Now I am able to see all the tables but not only, it loaded also all the constrains or other parameters as objects... Do you think it would be possible to excude them and visualize only tables?
Can you address me where to find a kind of user manual for the wizard?
Thanks in advance,
Michela
02-24-2010 08:54 AM
Hi Michela,
Excellent, I'm glad to hear you can now see your data base in the SQL Wizard. Unfortunately, I never got around to documenting this application. I'm puzzled by your statement that you loaded all the "contraints or other parameters as objects". You can define query conditions (restraints) in the SQL Wizard yourself, but you can't load them into the SQL Wizard. If you run a query that you've defined in the SQL Wizard, it will load the resulting records into data channels in a new Group in the Data Portal. You can click on the "VIEW the loaded data set" button near the top left of the SQL Wizard to look at the loaded records in a VIEW table.
I think it would be best to continue this discussion over email-- feel free to contact me at brad.turpin@ni.com
Brad Turpin
DIAdem Product Support Engineer
National Instruments