Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

1 dimensional array as input parameter to stored procedure

Posted on 2001-09-03
4
Medium Priority
?
687 Views
Last Modified: 2008-02-26
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
Comment
Question by:GeoffKell
  • 2
4 Comments
 
LVL 18

Expert Comment

by:nigelrivett
ID: 6450912
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
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6450916
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
 
LVL 18

Accepted Solution

by:
nigelrivett earned 800 total points
ID: 6451214
Here are some articles on the CSV option.

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

0
 
LVL 5

Author Comment

by:GeoffKell
ID: 6451669
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question