This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / [Q] How to pass arrays to Microsoft SQL Server stored proceduresI need to pass arrays of strings and arrays of integers from windows application (C#/ADO.NET) to stored procedures.
Any advice is appreciated.
C.W.
-carletonwong(carletonwong);
2006-1-20
{155}
(#2733892@0)
-
CW是什么意思?我把数组拼成一个字符串传过。不知道有什么其它好方法。select @nFind=charindex ( "|", @strArray)
while ( @nFind >=0 )
begin
if ( @nFind > 0 )
begin
select @str = left(@strArray,@nFind-1)
do something
end
select @strArray = Substring ( @strArray, @nFind+1,len(@strArray)-@nFind )
select @nFind=charindex ( "|", @strArray)
End
select @str = @strArray
if ( @str != "" )
begin
do something
End
-holdon(again);
2006-1-20
{369}
(#2734165@0)
-
type your question in google, see what you got?
-guestagain(guest again);
2006-1-20
(#2734393@0)