How to pass an object to stored procedure?

  • Hi,

    From asp.net c# application I am passing the user identity parameter

    to a stored procedure for inserting. This user identity, which asp.net see as an object.

    But I have no idea what SQL Server 2005 sees it as. Because if I put the parameter

    as string, it failed.

    But I have never heard of passing an object as a parameter to stored procedure.

    if it is possible, and if so, how?

    any input would be appreciated.

  • I would suggest that you serialize the object to an XML string pass it to the stored procedure. From within your stored procedure you can extract the information from the XML parameter.

    .

  • Thanks Jacob for responding. I found out that I could pass it

    as string to stored procedure and leave it as windows identity type

    in asp.net, then it works.

    thanks. michelle.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply