Hello, I&#039;m having problems passing a string value from COM to VB, when I run a test in VB with a message box, the string variable (AccountNumber) is not returned. I would really appreciate some help. <BR><BR>Thanks, <BR><BR>COM <BR>*** <BR><BR>Public Function checklogin(userID As String, Password As String) As String <BR>&#039;SETTING MTS OBJECT <BR> Dim objOContext As ObjectContext <BR> Set objOContext = GetObjectContext() <BR> <BR> &#039;DECLARING ERROR MESSAGE VARIABLES <BR> Dim lErrNo As Long <BR> Dim sErrDesc As String <BR> On Error GoTo ErrorHandler <BR> <BR> &#039;SET ADO OBJECTS <BR> Dim objConn As New ADODB.connection <BR> Dim objRS As New ADODB.recordset <BR> Dim objCommand As New ADODB.Command <BR> Dim objParam As New ADODB.Parameter <BR> <BR> &#039;OPEN CONNECTION AND DATABASE <BR> With objConn <BR> .ConnectionString = DB_CONNECTIONSTRING <BR> .Open <BR> End With <BR> <BR> &#039; USE COMMAND OBJECT TO CALL STORED PROCEDURE <BR> With objCommand <BR> .CommandText = "spLogin" <BR> .CommandType = adCmdStoredProc <BR> .ActiveConnection = objConn <BR> End With <BR> <BR> &#039; PASS ACCOUNTNUMBER TO STORED PROCEDURE <BR> Set objParam = objCommand.CreateParameter("@userID", adVarChar, adParamInput, 15, userID) <BR> Set objParam = objCommand.CreateParameter("@Password", adVarChar, adParamInput, 15, Password) <BR> &#039;Set objParam = objCommand.CreateParameter("@AccountNumber", adVarChar, adParamOutput, 15, AccountNumber) <BR> objCommand.Parameters.Append objParam <BR> Set objRS = objCommand.Execute <BR> checklogin = objRS.Fields("AccountNumber") <BR> objRS.Close <BR><BR>VB <BR>** <BR><BR>MSFlexGrid1.Visible = False <BR> Dim userID As String <BR> Dim Password As String <BR> Dim x As String <BR> userID = "123bbb" <BR> Password = "456bbb" <BR> Set var1 = CreateObject("SNCls3.SNOrderDir3") <BR> var2 = var1.Checklogin(userID, Password) <BR> <BR> MsgBox var2 <BR><BR> Set var1 = Nothing <BR> Set var2 = Nothing <BR><BR>SP <BR>*** <BR><BR>@userID varchar, <BR>@Password varchar <BR>AS <BR>SELECT * FROM Login WHERE UserID= @userID OR Password = @Password