Zoltan Report post Posted 04/17/2007 06:32 PM What is the maximum character lenght of the value of a RV? I tried to put a long MySQL connection string into a RV[mysql] variable but VG cut it after the 30th character. Share this post Link to post
SupportTeam Report post Posted 04/17/2007 10:52 PM Which version of VoiceGuide are you using? Share this post Link to post
Zoltan Report post Posted 04/18/2007 05:51 AM Which version of VoiceGuide are you using? I use the latest 6.0.3310 The problem is not the lenght of the variable as I previously thought but maybe the } bracket in a result variable. if I use the following connection in each script, everything works well: remoteConnection.Open ("Driver={MySQL ODBC 3.51 Driver};Server=localhost; Database=amanda;User=root;Password=;Option=3;") When I try to refer to the connection with a result variable, it does not work. in the first script: strMySQLConn = "Driver={MySQL ODBC 3.51 Driver};Server=localhost; Database=amanda;User=root;Password=;Option=3;" vg.RvSet lngLineID, "MySQLConn", strMySQLConn and in the next scripts: strMySQLConn = "$RV[MySQLConn]" remoteConnection.Open "" & strMySQLConn & "" And the result in the temp folder in the vbs_4_2 file: strMySQLConn = "Driver={MySQL ODBC 3.51 Driver" So the end of the connection string is cut off starting with the } character. When I use () instead of {} there is no cut off problem but the connection does not work. I also played with the " quation marks but it does not influence the outcome. I suspect that } cannot be placed in a result variable. Share this post Link to post
SupportTeam Report post Posted 04/18/2007 10:19 AM Please update your v3310 install with attached .exe (build 3316) This .exe should accept "}" as part of the RV. "}" is used to indicate end of individual RV in RV lists - and looks like that's where the bug stemmed from. VgMulti_3316.zip Share this post Link to post
Zoltan Report post Posted 04/18/2007 02:09 PM Thank you. This 3316 update works well and solved the } problem. I hope it will work in future versions, too. Another thing I am trying to achieve is to put large amount of vb codes and statements in a single result variable so I do not need to repeat them in every script. For example, one RV would contain: Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adCmdText = 1 Const adCmdTable = 2 Const adStateOpen = 1 How can I use only one result variable to include multiple VBscript statements like the ones above? Do you have array result variables? Actually i want to imitate the "include" functionality that e.g. php has. I know that VBscript does not use includes but maybe RV[] -s can solve the problem. I wonder whether RV Globals can be used to achieve this. Unfortunately, the help file contains only one paragraph about globals - not too much guide: "Selecting "Make Global RV" will make the created variable a "Global Result Variable". Global RVs need only be used if many different lines want to be able to read/set a central globally available variable which is retained by VoiceGuide as long as the software is running and does not get reset when any new calls arrive on any lines. (This option is used only in rare circumstances)." Share this post Link to post
SupportTeam Report post Posted 04/18/2007 09:25 PM Have you tried assigning the chunk of code to an RV using the EValuate Expression module? Just place all the code in the Evaluate Expression module and then use the RV for that module in VBScripts. Share this post Link to post