Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New column of remote table
Message
De
02/04/2000 03:34:49
 
 
À
01/04/2000 23:07:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00353992
Message ID:
00354003
Vues:
18
>>>I need to know how to insert a new column (or modify the structure) in runtime in a remote table from vfp6.0..
>>>
>>>thanks in advance
>>
>>If by "remote table" you mean one in a backend database like SQL Server or Oracle, you would need to use SQL passthrough to do this. Use SQLCONNECT() to create a connection to the database, then SQLEXEC() to pass a command to the back end to add the column.
>>
>>The exact syntax of the command you pass using SQLEXEC() depends on the backend you're using.
>>
>>You also need permission in the remote database to modify the table(s).
>
>I already have a connection to the database created in ms Acces.
>
>i use this commant to try to modify
>
>=SQLEXEC(NHANDLE,"ALTER TABLE GROUPS ADD COLUMN fax c(20)")
>
>obviously, the connection its working rigth but this command never modify the table or add a column

I don't know Access, but from a quick browse of MSDN online library you might try:

=SQLEXEC(NHANDLE,"ALTER TABLE GROUPS ADD COLUMN fax Text;")
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform