.NET Framework Bookmark and Share   
 index > JScript for the .NET Framework > get value of the variable in sql query
 

get value of the variable in sql query

var conn = new ActiveXObject("ADODB.Connection");
var cmd = new ActiveXObject("ADODB.Command");
var sqlQurey;
var connectionString = "Provider=SQLOLEDB.1; Data Source=" + exceptionDBServer + "; User ID=" + userID +
" ;Password=" + password + "; Initial Catalog=" + exceptionDB;
conn.open(connectionString);
sqlQurey = "DECLARE @return_value int exec @return_value=storedProName'" + pram1+ "','" + pram2+ "','" + pram3+
"','" + pram4+ "'," + pram5+ "," + pram6;
cmd.ActiveConnection = conn;
cmd.CommandType = 1;
cmd.CommandText = sqlQurey;
cmd.Execute();
cmd.close;
conn.close;


so I want to get the @return_value in the JScript code.
for example:
var out_pram;
then how to give the value of @return_value to out_pram
Thanks!
love_your_eyes
Assign the @return_value value to any hidden field in the page and then access the value through JScript
Captain Nidish

We are changing the issue type to “General Discussion�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Harry Zhu

You can use google to search for other answers

Custom Search

More Threads

• Passing window argument in dialgoArguments.window.open
• help with context menu on Grid
• List all functions and variables In JScript
• How to set the web controls disabled by JavaScript embed in HTML?
• Syntax for applying custom attributes to properties?
• Execution JScript in SilverlIght Application using DLR
• move div top position to the mouse position
• using javascript defined variable values into database
• JScript events in Windows Explorer
• var fso = new ActiveXObject("Scripting.FileSystemObject"); does not work!