ASP Access stored procedure doesn't accept leading zero

Discussion in 'ASP General' started by Jeff Lowry, Jan 12, 2005.

  1. Jeff Lowry

    Jeff Lowry Guest

    I'm pasing a zip code as a prameter to an Access stored procedure. In
    Access the parameter is a text data type. It works for non-leading zero
    zip codes but, apparently access (or ASP) is converting it to a value
    first (dropping the zero) then sending that to my SP. Even if I use
    cStr() to be sure the parameter is sent a string it still seems to drop
    the leading zero. Any thoughts? Note: It needs to be a string for
    canadian zip codes. Thanks!

    DEVBuilder.org, http://www.DEVBuilder.org
    ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
    Jeff Lowry, Jan 12, 2005
    #1
    1. Advertising

  2. Jeff Lowry

    Jeff Lowry Guest

    I had 2 parameters in my stored procedure. If I put the "text" one
    before the "long" one then it worked. Can't argue with success.

    DEVBuilder.org, http://www.DEVBuilder.org
    ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
    Jeff Lowry, Jan 12, 2005
    #2
    1. Advertising

  3. Jeff Lowry wrote:
    > I had 2 parameters in my stored procedure. If I put the "text" one
    > before the "long" one then it worked. Can't argue with success.
    >

    You need to supply te parameters in the same order that Access prompts you
    for them when you test the saved query in Access.

    http://www.google.com/groups?selm=&oe=UTF-8&output=gplain

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Jan 12, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad

    add leading zero

    tshad, Nov 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    13,252
    tshad
    Nov 9, 2005
  2. Mike P
    Replies:
    0
    Views:
    3,280
    Mike P
    Jun 19, 2006
  3. james
    Replies:
    2
    Views:
    872
    Bengt Richter
    Dec 2, 2003
  4. John Nagle
    Replies:
    4
    Views:
    583
    James Antill
    Aug 7, 2007
  5. Delaney, Timothy (Tim)
    Replies:
    0
    Views:
    561
    Delaney, Timothy (Tim)
    Aug 7, 2007
Loading...

Share This Page