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

    Unanswered: 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

  2. #2
    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.

    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

Posting Permissions

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