Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: SQL long field names Date: Sun, 4 Jul 2021 15:30:01 +0200 Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: individual.net WIAk/SPxjcd89w3IcWUWfwsoXts7uFZxvHBHkikkzLQOsV3ys= Cancel-Lock: sha1:sncLGrR/S0NPJ4zAA7vLpVxdgjk= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:13369 Hi Henry, > I try to connect, via SQL objects, to an external internet host > MySQL, and build from it local dbf files. The external MySQL has > file names longer then 10, so DbCreate() truncate them. Any idea how > to solve the problem? if you are using your own dbServer subclass you could maintain an internal array of mapped fieldnames. I would use the first 8 characters of every fieldname and than add a 2 characters numeric suffix, and store that in some external configuration file. Then, when opening the DBF, read the aliases from your configuration file and map that in a subclassed FieldGet()/FieldPut()/IVarGet()/IVarPut() method. But there is also something like this already built in: please look at the DBFieldInfo() function or the DBServer:FieldInfo() method, using the constant DBS_ALIAS should do what you need (I have not tested that, so you have to try it yourself). Wolfgang --