10-26-2005 07:15 AM
10-27-2005 09:53 AM
Hi Nuria,
I wrote the SQL_Wizard application you are using initially in DIAdem 9.0. The first versions had a provision to bind Text columns to global DIAdem text variables and insert a placeholder numeric channel of the same name with index values showing the length of the invisible global variable. This is one option for you, and it will work fine if you just want to show that text column in a REPORT table, say.
The other option is to create a new empty text channel with ChnAlloc(), set the length to the correct value with ChnLength(), then write in the values cell by cell from SQL_Result() using ChT(). This is slower, but you will have what you probably really want-- an honest-to-goodness text channel with the text column values in it.
Ask if you need additional assistance,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
10-27-2005 11:15 AM
10-28-2005 08:15 AM
Hi Nuria,
If all you want is to show the text column in a REPORT table, then you can just bind the text column to a new global DIAdem string array variable with the following command:
Call SQL_BindVar(SQL_ColName(i), SQL_ColName(i), "F", "Single")
Now you can add a column to your REPORT table of type "Variable" (instead of "Channel" or "Expression").
Ask if you have additional questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments