Muthukumar Palaniappan
Muthukumar Palaniappan

Reputation: 1670

how to create stored procedure with parameters of complex datatypes

I am about to create a SQL Server stored procedure to insert into 3 tables. For Ex: Registering an user. To register an user the system need entry in 3 tables.

Class User
{
UserGeneralDetails details;
UserAccountInformation acountInfo;
UserContactDetails contactInfo

CreateUser()
{
DbModule.CreateUser(this); // this function can further invoke the store proc with User object
}

}

Is it possible with stored procedure to receive parameters of complex types.

Upvotes: 0

Views: 2132

Answers (1)

dean
dean

Reputation: 10098

You can use XML datatype for the parameter, or use table-valued parameter:

http://msdn.microsoft.com/en-us/library/bb675163%28v=vs.110%29.aspx

Upvotes: 1

Related Questions