derok 0 Posted July 19, 2011 Report Share Posted July 19, 2011 (edited) Hi,i have a stored procedure in sql, it takes a parameter, and displays some data: 4> CREATE PROCEDURE usp_Employee(@ID nvarchar(50) )7> AS8> SELECT name, lastname FROM employee WHERE ID = @ID> GO i am doing something like this in vb script: Dim id = "1"Set Conn = CreateObject("ADODB.Connection") Conn.Open "xxx" Set objCommandSec = CreateObject("ADODB.Command") objCommandSec.ActiveConnection = Conn objCommandSec.CommandType = 4 objCommandSec.CommandText = "usp_Employee" .Parameters.Append .CreateParameter("@ID", 200, 1, 100, id) .ExecuteDim namename = objCommandSec . items("name").Value but i get to this part:name = objCommandSec . items("name").Valueit sends error: "object name is not in the collections".is like the command object never gets the values from the database.how can i get the values from the dabatase?how can i fix this?thanks.. Edited July 19, 2011 by derok Quote Link to post Share on other sites
derok 0 Posted July 19, 2011 Author Report Share Posted July 19, 2011 anyone please? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.