Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in converting an array into a table?

Status
Not open for further replies.

Hacktastic

Technical User
Feb 27, 2007
54
US
Hi Guys,

I have an API that fetches data from a URL and posts it into an array format.

I would like to have that array write to a table.

Questions:
Do I need to create the table definition first?

How do I place the data from an array format into a table structure?

Any guidance would be greatly appreciated.

Chris

 


Hi,

Check out this faq222-1422

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip,

I understand, however how will i populate my table with the data i receive that is already in an array?
 


Open an ADO recordset using the TABLE.

in a loop, assign each row's array values like...
Code:
for i = 0 to ubound(arry)
    rst.Open sSQL, cnn, adOpenDynamic, adLockPessimistic, adCmdTable
                          
    rst.AddNew

    j=0
    for each fld in rst.fields
       rst(j) = arry(i,j)
       j=j+1
    next
                  
    rst.Update
next

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top