If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Operation no supported with Jet

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-03, 14:01
kaukinend kaukinend is offline
Registered User
 
Join Date: Feb 2003
Posts: 4
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,
Daniel

// 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
...
Reply With Quote
  #2 (permalink)  
Old 02-20-03, 00:04
playernovis playernovis is offline
Registered User
 
Join Date: Nov 2002
Location: San Francisco
Posts: 251
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....


jiri
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On