Send Dictionary Object to Stored procedure?

Discussion in 'ASP General' started by Shahid Juma, Oct 12, 2004.

  1. Shahid Juma

    Shahid Juma Guest

    Hi,

    I was wondering before I proceed much further whether it is possible to pass
    in the Dictionary object (Scripting.Dictionary) from ASP to a stored
    procedure in SQL Server. Any sample sites or simple code examples would be
    really great.

    Thanks,
    Shahid
     
    Shahid Juma, Oct 12, 2004
    #1
    1. Advertising

  2. I think you'd have to pull the values of out your dictionary object and pass
    them.

    Ray at home

    "Shahid Juma" <> wrote in message
    news:%...
    > Hi,
    >
    > I was wondering before I proceed much further whether it is possible to
    > pass
    > in the Dictionary object (Scripting.Dictionary) from ASP to a stored
    > procedure in SQL Server. Any sample sites or simple code examples would be
    > really great.
    >
    > Thanks,
    > Shahid
    >
    >
     
    Ray Costanzo [MVP], Oct 12, 2004
    #2
    1. Advertising

  3. Shahid Juma

    Shahid Juma Guest

    How about arrays? Can arrays be passed? The dictionary object has functions
    that return the values as arrays.

    Shahid

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:%23iN6f$...
    > I think you'd have to pull the values of out your dictionary object and

    pass
    > them.
    >
    > Ray at home
    >
    > "Shahid Juma" <> wrote in message
    > news:%...
    > > Hi,
    > >
    > > I was wondering before I proceed much further whether it is possible to
    > > pass
    > > in the Dictionary object (Scripting.Dictionary) from ASP to a stored
    > > procedure in SQL Server. Any sample sites or simple code examples would

    be
    > > really great.
    > >
    > > Thanks,
    > > Shahid
    > >
    > >

    >
    >
     
    Shahid Juma, Oct 12, 2004
    #3
  4. Nope. You can join an array and then split it again in your stored
    procedure, example:
    http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm

    Ray at home

    "Shahid Juma" <> wrote in message
    news:...
    > How about arrays? Can arrays be passed? The dictionary object has
    > functions
    > that return the values as arrays.
    >
    > Shahid
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > message news:%23iN6f$...
    >> I think you'd have to pull the values of out your dictionary object and

    > pass
    >> them.
    >>
    >> Ray at home
    >>
    >> "Shahid Juma" <> wrote in message
    >> news:%...
    >> > Hi,
    >> >
    >> > I was wondering before I proceed much further whether it is possible to
    >> > pass
    >> > in the Dictionary object (Scripting.Dictionary) from ASP to a stored
    >> > procedure in SQL Server. Any sample sites or simple code examples would

    > be
    >> > really great.
    >> >
    >> > Thanks,
    >> > Shahid
    >> >
    >> >

    >>
    >>

    >
    >
     
    Ray Costanzo [MVP], Oct 12, 2004
    #4
  5. SQL Server does not understand what dictionary objects or arrays are. You
    will have to flatten them into strings in order to pass them to a stored
    procedure. One way is through comma-delimited lists:
    http://www.aspfaq.com/2248

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Shahid Juma" <> wrote in message
    news:#...
    > Hi,
    >
    > I was wondering before I proceed much further whether it is possible to

    pass
    > in the Dictionary object (Scripting.Dictionary) from ASP to a stored
    > procedure in SQL Server. Any sample sites or simple code examples would be
    > really great.
    >
    > Thanks,
    > Shahid
    >
    >
     
    Aaron [SQL Server MVP], Oct 12, 2004
    #5
  6. Shahid Juma wrote:
    > Hi,
    >
    > I was wondering before I proceed much further whether it is possible
    > to pass in the Dictionary object (Scripting.Dictionary) from ASP to a
    > stored procedure in SQL Server. Any sample sites or simple code
    > examples would be really great.
    >
    > Thanks,
    > Shahid

    In addition to Aaron and Ray's suggestions, Erland has several other options
    in his article about Arrays and Lists here:

    http://www.sommarskog.se/index.html

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Oct 12, 2004
    #6
    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. Patrick

    send email through stored procedure

    Patrick, Jan 24, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    4,164
    Steve C. Orr [MVP, MCSD]
    Jan 24, 2005
  2. Chris
    Replies:
    8
    Views:
    10,456
    Chris
    Mar 27, 2006
  3. Mike P
    Replies:
    0
    Views:
    3,372
    Mike P
    Jun 19, 2006
  4. AlexWare
    Replies:
    2
    Views:
    786
    Paul Uiterlinden
    Oct 23, 2009
  5. Drew
    Replies:
    2
    Views:
    146
Loading...

Share This Page