Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New column of remote table
Message
From
02/04/2000 01:50:11
 
 
To
01/04/2000 23:07:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00353992
Message ID:
00354001
Views:
17
>>>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

>=SQLEXEC(NHANDLE,"ALTER TABLE GROUPS ADD COLUMN fax c(20)")

The bolded string portion needs to be an MS Access command, not a VFP command. You need to use the appropriate Access syntax. Sorry, I don't know Access, I can't help you there.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform