Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: ade stilllearning
  Where is ade stilllearning?
 jakarta
 Indonesia
 ade stilllearning
 Tags
Subject: retrieve data from cursor
Thread ID: 233310 Message ID: 233310 # Views: 58 # Ratings: 0
Version: Visual FoxPro 7 Category: Databases, Tables and SQL Server
Date: Wednesday, July 01, 2009 12:24:18 PM         
   


dear fox pro experts, i'm trying to insert data from cursor that i got from odbc.

lcXLS file = getfile()
lnConn=SQLSTRINGCONNECT("Driver={Microsoft Excel Driver (*.xls,*.xlsx,*.xlsm,*.xlsb)};DBQ=&lcXlsFile")
SQLCOLUMNS(lnconn,"[sheet1$]",'NATIVE','crscolumns')

SQLTABLES(lnconn,"","sheetnames")
scan
    lctablename=trim(sheetnames.table_name
    lcoutput=chrtran(m.lctablename,'$','_')
    SQLEXEC(lnConn,'select * from ['+m.lctablename+']',m.lcoutput)
endscan

how could i retrieve column name from m.lcoutput into column in a dbf table

select * from &lcoutput into cursor tr
select tr
go top 
do while !eof

    insert into mytable (col1,col2,col3) values * how to get the column of cursor tr
enddo



thanks in advance



COMPLETE THREAD
retrieve data from cursor Posted by ade stilllearning @ 7/1/2009 12:24:18 PM
RE: retrieve data from cursor Posted by Stefan Wuebbe @ 7/1/2009 12:50:17 PM
RE: retrieve data from cursor Posted by ade stilllearning @ 7/2/2009 10:26:18 AM
RE: retrieve data from cursor Posted by Stefan Wuebbe @ 7/2/2009 12:01:54 PM
RE: retrieve data from cursor Posted by ade stilllearning @ 7/6/2009 6:15:00 AM
RE: retrieve data from cursor Posted by Stefan Wuebbe @ 7/6/2009 7:39:25 AM
RE: retrieve data from cursor Posted by ade stilllearning @ 7/13/2009 8:24:59 AM
RE: retrieve data from cursor Posted by ade stilllearning @ 7/13/2009 8:25:41 AM