View previous topic :: View next topic |
Author |
Message |
timn
Joined: 20 Nov 2003 Posts: 184 Location: United States
|
Posted: Mon Jan 12, 2004 9:23 am Post subject: Ability to use User Defined Variables (udv) in ODBC SQL |
|
|
Came across a case where it would be handy to specify a user defined variable (%udv_xxxx%) in the "Execute SQL query" text box of the ODBC SQL test dialog.
I have 12 SQL servers where the query I want to run is identical on each machine. The query itself may change from time to time but it will always be identical for all 12 machines.
Thus, if I could define %udv_MyQuery% as "SELECT Count (*) ..." I would only have to change it in one location.
Not a huge deal - it might be tricky to distinguish between a UDV and a SQL text search pattern (i.e SELECT...WHERE somefield LIKE '%BOB%') |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
|
Back to top |
|
|
timn
Joined: 20 Nov 2003 Posts: 184 Location: United States
|
Posted: Tue Jan 13, 2004 9:52 am Post subject: |
|
|
Alex:
Aha. I discovered the problem. I was running 4.16 but what I was doing
was pressing the TEST button in the lower right corner of the "ODBC SQL Test" dialog.
Packet sniffer shows that when TEST button is pressed, the UDV name is being passed untranslated on port 1433 to the SQL server (i.e. "%udv_sqljoblogquery%" ).
However, if I save the test, then refresh, packet sniffer shows the translated UDV value is passed (i.e. "SELECT COUNT(*) ..."),
Thus the test works fine, but the 'test of the test' does not because the UDV is not being translated.
I don't know if this is a 'bug' per se, but thought I should pass it along.... |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
Posted: Tue Jan 13, 2004 10:09 pm Post subject: |
|
|
You are right. Will be fixed in next version.
Regards
Alex |
|
Back to top |
|
|
|