>I need to rename a field in my databse using a query..
>I'm coding in VB and i'm link with an ODBC.. unfortunatly..
> this :
>
>ALTER TABLE NameOfTable RENAME COLUMN NameOfField TO NewNameOfField
>
>does not work.. i keep having thi error
>"Syntax error in ALTER TABLE statement"
>
>I know the RENAME exist for foxPro but doesn't seem to work for VB
>is there another way?
What version of the VFP ODBC driver are you using? This command is VFP-specific and is supported on the VFP driver that comes with MDAC 2.5.
You can see what commands are supported by looking in the drvvfp.hlp help file that should be in your c:\windir\system | system32 directory.
I tested this and works OK, same syntax as you are using. The only requirement there is that you need to specify on the DSN that the file be opened for exclusive use.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement