VB has just gone weird
Posted on 2003-03-06
Somehow every local, global and module level string variable in my program (even the Connection String Property of the ADO Connection object!) is getting set to the same SQL Query string.
The SQL query is built in a function, assigned to a local variable, then passed back to another function which executes it. If I step through it all works fine, if I try to run through it errors because the check;
If strOrder_By <> "" Then ...(add the order by clause)
Hovering over and debug printing strOrder_By says it equals "" but when VB evaluates this line it runs the Then statement???
The really crazy thing is if I hit End on the error message window, then re-run the program... every string is still set to the last SQL Query, sames as when I stopped the prog. I have to re-start VB to get it to run again, rebooting PC has no effect.
With the same code this is doing the same thing on both of my machines (VB6 SP5). Am I going mad or have you guys seen this kind of insanity before?
Please Help if you can,