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 > OLEDB & Long fieldnames

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-10-03, 14:43
kaukinend kaukinend is offline
Registered User
 
Join Date: Feb 2003
Posts: 4
OLEDB & Long fieldnames

Hi all,
I have searched through this forum for an answer to my problem, and have come across some great solutions, but to other problems.
I am trying to access DBF file by using the Extended Properties of the OLEDB. Now I can open, query, add and remove data from the record set that is returned.
My problem is in trying to do any form of table modifications. I have used ADOX and ADO and have connected to the dbf with no problem. If I run a SQL "alter table <table> rename column" or "alter table <table> insert column" through a command I get an error that these cannot be run against a table that has data in it (????). The fields.append has also given me numerous headaches, as I have just been unable to get it to work for me.
Then I moved on and have tried to build a new table that mimicks the old table (but with the few changes that I want done). This seemed to work, until I looked at the file and saw that I cannot have field names (column names) longer the 10 characters. Is this a given problem with the OLEDB driver.
The dbf file is an ESRI shapefile, which is in DBASE IV format.

Any help would be GREATLY appreciated,
Daniel
Reply With Quote
  #2 (permalink)  
Old 02-11-03, 10:41
dbadelphes dbadelphes is offline
Registered User
 
Join Date: Feb 2003
Location: Montreal, Canada
Posts: 117
Re: OLEDB & Long fieldnames

The columns length cannot be longer than 10 characters in DBASE, so I think that your problem is here.

Quote:
Originally posted by kaukinend
Hi all,
I have searched through this forum for an answer to my problem, and have come across some great solutions, but to other problems.
I am trying to access DBF file by using the Extended Properties of the OLEDB. Now I can open, query, add and remove data from the record set that is returned.
My problem is in trying to do any form of table modifications. I have used ADOX and ADO and have connected to the dbf with no problem. If I run a SQL "alter table <table> rename column" or "alter table <table> insert column" through a command I get an error that these cannot be run against a table that has data in it (????). The fields.append has also given me numerous headaches, as I have just been unable to get it to work for me.
Then I moved on and have tried to build a new table that mimicks the old table (but with the few changes that I want done). This seemed to work, until I looked at the file and saw that I cannot have field names (column names) longer the 10 characters. Is this a given problem with the OLEDB driver.
The dbf file is an ESRI shapefile, which is in DBASE IV format.

Any help would be GREATLY appreciated,
Daniel
__________________
Steve
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