parameters parameters parameters

Results 1 to 1 of 1

Thread: parameters parameters parameters

  1. #1
    Join Date
    Dec 1969

    Default parameters parameters 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 byInsertPropProc 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], ... CHECKOWNERPROCSELECT OwnerInfo.UserName, OwnerInfo.UserPassword,... WHERE OwnerInfo.UserName = [(@UserName)] ANDOwnerInfo.UserPassword = [(@UserPassword)];ASP Code:Set cmdObj = Server.CreateObject("ADODB.Command")cmdObj.Command Text = "PropertyInsertProc"cmdObj.CommandType = &H0004Is 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)
    Video review
    Last edited by Jay; 04-16-2011 at 01:09 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