Solved

1 dimensional array as input parameter to stored procedure

Posted on 2001-09-03
4
679 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 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

815 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now