+ Reply to Thread
Results 1 to 2 of 2

Excel ADODB and SQL Server Table-Valued parameters

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    104

    Excel ADODB and SQL Server Table-Valued parameters

    I am trying to create a stored procedure that will take all of the data needed. The stored procedure needs to create one record in one table, use that primary key as a foreign key in a record in a second table, then use that primary key as a foreign key for several records in a third table. If I were using C#, I would create a stored procedure with parameters for each individual record, then for the multiple records to be added to the third table, I would use a table-valued parameter. I am creating an ODBC connection to my SQL Server database. Looking through the available datatypes for the parameters, I see Array, but I am not sure how to use that. It might be what I am looking for, but I am having trouble finding information on it. Perhaps my search-fu is weak.

    Can anyone point me in the right direction? A link or two would be most appreciated!
    Last edited by SlipEternal; 09-15-2017 at 02:19 PM. Reason: Solved it myself

  2. #2
    Forum Contributor
    Join Date
    07-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    104

    Re: Excel ADODB and SQL Server Table-Valued parameters

    Never mind. I just created a stored procedure to create the first two records, then a stored procedure to create each additional record. Then, I loop through the rows to grab the data to add for each additional record.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] ADODB recordset on excel table return null value when it shouldn't
    By lripoll in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-13-2016, 03:28 AM
  2. Send data to Server ADODB
    By johnny_p in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-05-2015, 09:52 AM
  3. VBA - pass a range to Table Valued Parameter
    By showry71 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-03-2014, 06:34 AM
  4. Object Required Error - Adodb Parameters
    By robnot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2007, 02:55 PM
  5. Call SQL Server Stored Procedures with parameters,
    By KCSL in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2006, 12:10 PM
  6. adodb connecting to a server issues
    By cgmckeever@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2006, 06:40 PM
  7. [SOLVED] Pivot Table Q: Creat using fieldA valueB OR fieldC valueD?
    By Jan K in forum Excel General
    Replies: 2
    Last Post: 02-20-2006, 10:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1