Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003

    Unanswered: Operation no supported with Jet

    Simply put, I am trying to rename a column.

    However whenever I execute the following code (for a delete) I get a run-time error: Operation not supported on a table that contains data.

    I think this is wrong, as I can open the file in access and run a sql command to do the same thing and it runs fine. Why would I need an empty database?

    Is the code sound, or is it a problem with the Jet engine?

    Although I used the following for this post, I also attempted to run a sql statement through a command connected to the same connection and got the same error. I have also attempted the delete and append through a recordset running on the same connection, again, with the same error. This is why I am thinking that it may have something to do with the jet.

    Any help would be greatly appreciated,

    // visual basic 6.0
    dim tmpConnection as ADODB.Connection
    dim adoxCatalog as ADOX.Catalog

    set tmpConnection = ADODB.Connection
    tmpConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & " Data Source=c:\dbases\; Extended Properties=""DBASE IV;"";"

    Set adoxCatalog = New ADOX.Catalog
    adoxCatalog.ActiveConnection = tmpConnection

    ' myFile.dbf is a dBase 4 file
    adoxCatalog.Tables("myFile").Columns(1).name ' does return a value
    adoxCatalog.Tables("myFile").Columns.delete(1) ' I get the error here
    adoxCatalog.Tables("myFile").Columns(1).name="newN ame" ' same error here

  2. #2
    Join Date
    Nov 2002
    San Francisco
    there are many issues with ADO 2.1 and higher and DBF files. DAO 3.5 works fine.... we discussed this in DBFORUMS a month ago....


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts