passing parameters

Results 1 to 1 of 1

Thread: passing parameters

  1. #1
    Join Date
    Dec 1969

    Default passing parameters

    have access database trying to insert info into. Keep getting error: Too few parameters. Expected 2. In the code below you see I call the CheckOwnerProc procedure. The CheckOwnerProc has two parameters that are needed to execute. I know how to pass the parameters for the fields requested by InsertPropProc but is it possible to pass the parameters first to the CheckOwnerProc so that the InsertPropProc may execute correctly. Shortened versions of code below. This error is not happening because fields are unequal or spelled wrong. I don't know how to pass the parameters through to the CheckOwnerProc from the InsertPropProc or if this is even possible. SQL Code: INSERTPROPPROC INSERT INTO CheckOwnerProc[**** Requires two parameters****] ( PropertyAddress, City, State, ... ) SELECT [@PropertyAddress], [@City], [@State], [@ZipCode], ... CHECKOWNERPROC SELECT OwnerInfo.UserName, OwnerInfo.UserPassword,... WHERE OwnerInfo.UserName = [(@UserName)] AND OwnerInfo.UserPassword = [(@UserPassword)]; ASP Code: Set cmdObj = Server.CreateObject("ADODB.Command") cmdObj.CommandText = "PropertyInsertProc" cmdObj.CommandType = &H0004 Is it possible to create the parameters for the CheckOwnerProc through the parameters created for PropertyInsertProc? i.e. cmdObj.Parameters.Append objCommand.CreateParameter ("OUserName", 200, &H0001, 20) cmdObj.Parameters.Append objCommand.CreateParameter("OUserPassword", 200, &H0001, 20)
    White Girls live
    Last edited by Jay; 04-16-2011 at 01:26 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts