Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 689
  • Last Modified:

1 dimensional array as input parameter to stored procedure

Anyone any code samples of how to pass a one dimensional array (70 elements) from VB into a SQL Server & stored procedure.

TIA

Regards
GK
0
GeoffKell
Asked:
GeoffKell
  • 2
1 Solution
 
nigelrivettCommented:
easiest ways are to create a csv string and parse it in the SP or to create a temp table in VB populate it and access it in the SP.
0
 
AlfaNoMoreCommented:
Check out the passing of a CSV to a stored procedure instead. I think you can then convert this csv into an array within the SP, but you won't be able to pass a variant type to an SP.
0
 
nigelrivettCommented:
Here are some articles on the CSV option.

http://www.sqlteam.com/item.asp?ItemID=637

0
 
GeoffKellAuthor Commented:
Thanks - I expected that a delimited string would the way to go but needed a quick confirmation with, ideally, some code.

The link you provided did just the trick

Regards
GK
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now