Solved

1 dimensional array as input parameter to stored procedure

Posted on 2001-09-03
4
682 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

738 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