Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADODB fox table SQL - Alter Table
Message
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
ADODB fox table SQL - Alter Table
Divers
Thread ID:
00332218
Message ID:
00332218
Vues:
58
I have a table in the field that currently has a c(30) field and now I want a c(4). I have executed the following code without error and without altering the table :) What is the problem with this code?
    If Dir("C:\test.dbf", vbNormal) <> "" Then
        Dim cn1 As New ADODB.Connection
        Dim cm1 As New ADODB.Command
        cn1.Open "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=D:\"
        cm1.ActiveConnection = cn1
        cm1.CommandType = adCmdUnknown
        cm1.CommandText = "ALTER TABLE C:\test.dbf ALTER COLUMN Field3 c(4)"
       cm1.Execute
    End If
Also, any tips for the SQL replace commands before I get into that?
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform