Re: Creating dbf table using ADO Recordset open method



Hi

First ofall, thank you for taking the time to respond to my question.
I will certainly look up more details on the DBF format , etc as you
suggested.

As for the version of the msado15.dll it is:

msado15.dll
2.81.1117.0 (xpsp_sp2_rtm.040803-2158)

I was curious, I also saw that there exists a masdo27.tlb, would you
recommend using this instead of the msado15.dll, what are the
differences? Its version is the same as the msado15.dll

msado27.tlb
2.81.1117.0 (xpsp_sp2_rtm.040803-2158)

Once again I appreciate your feedback.

Victor


On Wed, 27 Sep 2006 21:21:43 -0500, "Ralph"
<nt_consulting64@xxxxxxxxx> wrote:


<vp75040@xxxxxxxxxxxxxxx> wrote in message
news:cqmlh2lhoqsv0evkqt47qkp98l8u6gl6u5@xxxxxxxxxx

Hi All,

I have an MFC applicaiton where I connect to a dbf file using ado and
then get a recorcset from this file. All works fine. What I then do is
I create another dbf table by using CREATE Table ddl statement in the
recordset open method. It creates a table just fine, however if the
table name specified is longer than 8 characters is will truncate to 8
characters. Anyway around this? I am importing msado15.dll into my MFC
app.

Victor

If I remember correctly dBase limited field names and table names to 8
characters (first can't be a number). Table names are associated with File
Names so they were limited to the old Dos 8.3 format.

Since then other version of "xBase" have appeared, I think names were
extended to 24 and 32 characters. Even here you have to be careful because
(like past C compilers) the tool would accept a 32-char name, but only the
first 24 were significant.

It also depends on the tool you plan to use the .dbf file - obviously if it
can't accept 32-char 'names' - it does you little good to create them. The
provider/engine you are using now apparently is honoring only the least
common denominator.

You mentioned using msado15.dll, but that doesn't provide any clue as to
what version of ADO you are using, or the provider. M$ has been spotting on
its "xBase" support. (At one time removing it from the MDAC/Jet packages)

However, all is not lost. You may be able to use the FoxPro provider and
create xBase files which will allow longer names. (The core 'table' files
for FoxPro and xBase). Also the format for a dBase file is very simple and
well published. (A little googling should find numerous sites.) Using C++
you should be able to whip your own writer out in less than a day. (Again
you would have to make sure the receiving tool can handle longer names.)

There are also a ton of source code and several 3rd party tools you can
employ.

hth
-ralph

.



Relevant Pages

  • Re: How to maintain text characters when converting from xls to dbf f.
    ... I'm used to working with FoxPro DBFs which have a limit of 256 characters in ... characters for field names. ... Maybe DBF IV is the same. ... The dbf format trucates my text (in addition to the column ...
    (microsoft.public.excel.misc)
  • Re: EXPORT TO .DBF
    ... But why install Access if you want to edit data in dbf files? ... dBASE, FoxPro or Lotus Approach? ... >I do not have yet the .mdb files, ... >>>I need to export some tables in dBase format from Access format. ...
    (microsoft.public.access.externaldata)
  • Re: Invalid argument - importing dbf from shp-file
    ... Use the old DOS 8.3 file name convention. ... Also be sure the column names in the file are 10 characters or less. ... I'm trying to figure out what's different about this shp or dbf. ... to rename all the 7 files of the shp-file is built up of. ...
    (microsoft.public.access.externaldata)
  • Re: Dbase III field attributes
    ... > What is the largest text or character field attribute in DBF tables? ... > I would like to populate a field with 8000 characters. ... Andrew told you about memo fields, but you mentioned dbase III in a FoxPro ... When you USE a dBase dbf with a memo field, ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Linking a dbf file with a filename longer than 8 characters
    ... ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long ... > filenames longer than eight characters. ...
    (microsoft.public.access.externaldata)