Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLCOLUMNS() vs AFIELD()
Message
 
 
À
19/03/2003 10:08:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00767555
Message ID:
00767628
Vues:
8
I don't see a reason to use SQLCOLUMNS() if you want to get structure of VFP cursor even if it was created from Sql Server table.

>Now, there is an interesting issue. From a class list we are using, I was always using AFIELD() to detect the type of field and related information. That was ok for a VFP table. For a specific SQL Server table, I have found that by issuing a SQLEXEC() command that will return no record, I could then issue AFIELD() on the cursor and obtain the same type of information I need by using the same actual code.
>
>However, this will provide the equivalent of field types known in VFP. So, I will not exactly get the structure as is coming in from SQL Server but, for now, I think that could do the jo.
>
>When trying SQLCOLUMNS(), we have the ability to get a structure definition in VFP or native format. When obtaining it in VFP format, this seems to return basically the same information as AFIELD(). However, AFIELD() returns much more information than SQLCOLUMNS() when being used with FOXPRO as the format. So, the question is, when comparing those two approaches, is it still better to use AFIELD(), for flexibility and speed, or usually when dealing in this environment, it's better to use SQLCOLUMNS()?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform