DIFFICULT! Stored Proc, Appending Date Parameter

Results 1 to 2 of 2

Thread: DIFFICULT! Stored Proc, Appending Date Parameter

  1. #1
    Join Date
    Dec 1969

    Default DIFFICULT! Stored Proc, Appending Date Parameter

    I&#039m trying to append a Date parameter to a command object<BR>that will be sent to a stored procedure. But I&#039m getting<BR>all sorts of errors. <BR><BR>Here is the 1 line of code that I&#039m using:<BR>oCmd.Parameters.Append oCmd.CreateParameter("sBirthDay", adDate, adParamInput, ,BirthDay)<BR><BR>Do I use adDate, or adDBDate? What&#039s the difference?<BR>And do I enclose Birthday in single quotes, #&#039s, nothing?<BR><BR>

  2. #2
    Manish V Guest

    Default check the date format

    check the following things :<BR>1)name of the parameter ("sBirthday") shud be SAME as that defined at backend.<BR>2)adDate sends date in the date format which is set on ur machine. adDBdate will send in fixed format "yyyymmdd". <BR>so just check which format ur server is expecting.<BR>3)try specifyin the size of parameter as : len(cstr(birthday))<BR>as the 4th parameter.<BR>4)check the value of birthday variable before sending it.<BR>(u dont need any quotes for that)<BR><BR>let us know what error u get if any ! <BR><BR>manish.

Posting Permissions

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