Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Table argument for SQL query from .Net?

Author  Topic 

vermorel
Starting Member

26 Posts

Posted - 2006-07-15 : 12:01:34
I would like to pass a TABLE as argument for a SQL query from .Net (note: the objective is to pass a list of elements as opposed to a single elements). For now, I am multiplying the roundtrip to the database (i.e. multiple SQL queries).

Does anyone knows how I can achieve such feature?

Thanks in advance,
Joannès

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-15 : 12:32:43
You can create a temp table, populate it then access it from the sp.
Use a csv string for the elements.
Create an xml doc then access it in the sp.

The csv string is probably the most common way.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -