Link to home
Start Free TrialLog in
Avatar of OmerFarukZ
OmerFarukZFlag for Türkiye

asked on

Table valued parameters in SqlServer 2005

Hi,
I want to use table type parameter for procedure because i need insert to to many rows(300000) quicly. This problem was solved in sqlserver 2008. I need like this code;

create proc(@tbl table(a int, b nvarchar(10))
as
begin
      insert into mytable(a,b)
      select a,b from @tbl
end

or

i change this row like to:
create proc(@tbl myTableType)
as
...
...

How can i insert to many rows in a one transaction.

I'm use ado.net 1.1(asp.net) and sqlserver 2005.

Best Regards.
Avatar of OmerFarukZ
OmerFarukZ
Flag of Türkiye image

ASKER

And which sqldbtype must used?(ado.net not contain sqldbtype.structed)
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Click for more information the structed dbtype in .net: http://msdn.microsoft.com/en-us/library/bb675163.aspx. xml idea is very logical, i try and reply to you.

Does xml type kind of support more than 8000 characters?
>Does xml type kind of support more than 8000 characters?
in sql 2005, yes. up to 2GB
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
okay I'll try