Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Location
    Italy
    Posts
    2

    Unanswered: Passing nulls or empty strings to SP

    Is there a simple way to pass a null value or empty string to a Stored Proc parameter?

    Say I have:

    sqlCmd.Parameters.Append sqlCmd.CreateParameter("@AN_EMAIL_1", adVarChar, adParamInput, Len(strAN_EMAIL_1), strAN_EMAIL_1)

    The ASP code won't work if either strAN_EMAIL_1 is "" or null. And this even before of calling the SP. So it won't work to have @AN_EMAIL_1 varchar(50) = NULL defined in the SP

    Thanx in advance...

    I just had a nasty Idea... trying this: Len(strAN_EMAIL_1)+1 (since I use varchar shouldn't be a problem when I have not empty strings.. will it work?)

  2. #2
    Join Date
    Jul 2002
    Location
    Italy
    Posts
    2
    With Len(...) + 1 it won't work the same...

    ADODB.Parameters errore "800a0e7c'

    L'oggetto Parameter non stato definito correttamente. Le informazioni fornite sono incoerenti o incomplete.

    (Parameter object it's not defined correctly. Data submitted is incoherent or missing)

Posting Permissions

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