Method for Passing 2 dimensional Variant Array to SQL 7

Method for Passing 2 dimensional Variant Array to SQL 7

Post by WBag » Sun, 06 Feb 2000 04:00:00



I would like to insert a variant array (25,7), generated in ASP, into an sql
table with minimal contortions.  The array simulates a recordset.  I could:

1. change the array into text at the com level and then pass it down.
2. use DTS objects to pump the data from the middle tier down to the database.

Does anyone have a suggestion of what might be the best method and some code
that might show me the way?

Thanks in advance

 
 
 

Method for Passing 2 dimensional Variant Array to SQL 7

Post by D. Patrick Hoerte » Mon, 07 Feb 2000 04:00:00


WBagel,

    Is it simulating a one-column result-set with multiple rows, or a
one-row resultset with multiple columns?

D. Patrick Hoerter


>I would like to insert a variant array (25,7), generated in ASP, into an
sql
>table with minimal contortions.  The array simulates a recordset.  I could:

>1. change the array into text at the com level and then pass it down.
>2. use DTS objects to pump the data from the middle tier down to the
database.

>Does anyone have a suggestion of what might be the best method and some
code
>that might show me the way?

>Thanks in advance


 
 
 

Method for Passing 2 dimensional Variant Array to SQL 7

Post by WBag » Tue, 08 Feb 2000 04:00:00


25 records of 7 columns each.
 
 
 

Method for Passing 2 dimensional Variant Array to SQL 7

Post by D. Patrick Hoerte » Tue, 08 Feb 2000 04:00:00


WBagel,

    Create a stored procedure that takes 7 parameters (one for each
dimension of your 'array').

    Inside the stored procedure, construct and execute your INSERT.

    Of course, you will have to execute it 25 times (once for each 'element'
in the 'array')

    Alternatively, if you are certain that there will be no commas in your
data (such as if all numerics), then send a comma-delimited string to a
one-parameter stored proc, and parse the string on the server side into its
individual 7 components.

Regards,
D. Patrick Hoerter


>25 records of 7 columns each.

 
 
 

1. 2 dimensional variant array passed to SQL 7

I would like to insert a variant array (25,7), generated in ASP, into an sql
table with minimal contortions.  The array simulates a recordset.  I could:

1. change the array into text at the com level and then pass it down.
2. use DTS objects to pump the data from the middle tier down to the database.

Does anyone have a suggestion of what might be the best method and some code
that might show me the way?

Thanks in advance

2. Output from cursor

3. 2 dimensional variant array to SQL 7

4. ADO AddNew() with INNER JOIN query

5. How to pass two dimensional array from VFP to DLL (or FLL)

6. Lazywriter Warning

7. Passing Variant Array to Stored Procedure

8. NT re-installed, SQL server doesn't recognize database - please help

9. Passing variant array to stored procedure

10. Error passing Variant array to AddNew

11. How to Pass array as parameter to Init method of a form

12. PL/SQL: Two Dimensional Arrays

13. Does two dimensional arrays exist in PL/SQL?