Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLCOLUMNS() vs AFIELD()
Message
De
19/03/2003 10:08:48
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
SQLCOLUMNS() vs AFIELD()
Divers
Thread ID:
00767555
Message ID:
00767555
Vues:
50
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()?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform