Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13369
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: SQL long field names |
| Date | 2021-07-04 15:30 +0200 |
| Message-ID | <ikdreqFu46iU1@mid.individual.net> (permalink) |
| References | <b2294a19-f5b8-44e8-b474-416249d349c7n@googlegroups.com> |
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 --
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
SQL long field names Henry Fidler <zodcomag@gmail.com> - 2021-07-04 02:39 -0700
Re: SQL long field names "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-07-04 15:30 +0200
Re: SQL long field names Henry Fidler <zodcomag@gmail.com> - 2021-07-12 03:52 -0700
Re: SQL long field names "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-07-12 16:23 +0200
csiph-web