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
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: retrieve data from cursor
Thread ID: 233310 Message ID: 233697 # Views: 26 # Ratings: 0
Version: Visual FoxPro 7 Category: Databases, Tables and SQL Server
Date: Monday, July 06, 2009 6:15:00 AM         
   


> >
> > stefan i use vfp7, this code
> >
> >
> > Insert Into mytable (col1,col2,col3) Select * From ...
> > 

> > occurs an error with syntax error,
>
> Yes, it's Vfp9 syntax.
>
> > and i use afields() already, but the column name that showed from afield cannot be called using sql syntax, i dont know why..
> >
>
> You can perhaps concatenate a string, i.e. an SQL command, and then run it via ExecScript() or ¯o:
>
>
>
> * Command Window example createing an SQL field list on the fly:
> CREATE CURSOR temp (unknown i, fieldnames i, inthelist I)
> ? AFIELDS(laFields,'temp') && 3
> DISPLAY MEMORY LIKE laFields
> lcSQL = ""
> FOR lnField = 1 TO ALEN(laFields,1)
> 	lcSql = lcSql + IIF(EMPTY(lcSQL),'',',')+laFields[m.lnField,1]
> ENDFOR
> ? lcSQL
> 
> lcSQL = "Select " + m.lcSQL + " From temp"
> &lcSQL
> 

>
>
>
> hth
> -Stefan

Stefan, the main problem is how to retrieve memo data from cursor, which that i get the cursor from odbc connection..i want to put all the data into dbf table, thank you for your respond..thanks



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