Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

A computer scientist is someone who fixes things that aren't broken.


devel / comp.lang.clipper.visual-objects / Re: SQL long field names

SubjectAuthor
* SQL long field namesHenry Fidler
`* Re: SQL long field namesWolfgang Riedmann
 `* Re: SQL long field namesHenry Fidler
  `- Re: SQL long field namesWolfgang Riedmann

1
SQL long field names

<b2294a19-f5b8-44e8-b474-416249d349c7n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=865&group=comp.lang.clipper.visual-objects#865

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a0c:c986:: with SMTP id b6mr7828833qvk.48.1625391583257;
Sun, 04 Jul 2021 02:39:43 -0700 (PDT)
X-Received: by 2002:a37:9e0e:: with SMTP id h14mr8341363qke.277.1625391583063;
Sun, 04 Jul 2021 02:39:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Sun, 4 Jul 2021 02:39:42 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=87.102.215.94; posting-account=FsGVgwoAAAAo88J9fd3ig_ravrDh6B2l
NNTP-Posting-Host: 87.102.215.94
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b2294a19-f5b8-44e8-b474-416249d349c7n@googlegroups.com>
Subject: SQL long field names
From: zodcomag@gmail.com (Henry Fidler)
Injection-Date: Sun, 04 Jul 2021 09:39:43 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1202
 by: Henry Fidler - Sun, 4 Jul 2021 09:39 UTC

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?

Henry

Re: SQL long field names

<ikdreqFu46iU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=867&group=comp.lang.clipper.visual-objects#867

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: wriedmann@gmail.com (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: <ikdreqFu46iU1@mid.individual.net>
References: <b2294a19-f5b8-44e8-b474-416249d349c7n@googlegroups.com>
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
 by: Wolfgang Riedmann - Sun, 4 Jul 2021 13:30 UTC

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

--

Re: SQL long field names

<3e814551-8cd6-41e6-bc7e-91ebf9ac9029n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=882&group=comp.lang.clipper.visual-objects#882

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:6214:4b:: with SMTP id c11mr50478762qvr.18.1626087151719;
Mon, 12 Jul 2021 03:52:31 -0700 (PDT)
X-Received: by 2002:a0c:e905:: with SMTP id a5mr16480543qvo.11.1626087151507;
Mon, 12 Jul 2021 03:52:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Mon, 12 Jul 2021 03:52:31 -0700 (PDT)
In-Reply-To: <ikdreqFu46iU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=87.102.215.94; posting-account=FsGVgwoAAAAo88J9fd3ig_ravrDh6B2l
NNTP-Posting-Host: 87.102.215.94
References: <b2294a19-f5b8-44e8-b474-416249d349c7n@googlegroups.com> <ikdreqFu46iU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3e814551-8cd6-41e6-bc7e-91ebf9ac9029n@googlegroups.com>
Subject: Re: SQL long field names
From: zodcomag@gmail.com (Henry Fidler)
Injection-Date: Mon, 12 Jul 2021 10:52:31 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Henry Fidler - Mon, 12 Jul 2021 10:52 UTC

Wolfgang many thanks.

An internal array could be a logical idea, until someone changes the original names of the SQL in the host.
Dbs_Alias gave me little help. After assigning FieldInfo(Dbs_Alias, ...), the next time the file is opened, the alias has back the field name.

I hoped the SQL method will have a built in possibility to solve the problem.

Interesting: dbCreate() truncate the original field´s names, and build a db with few fields which have the same name.

Henry

Re: SQL long field names

<il31j9F1ss6U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=884&group=comp.lang.clipper.visual-objects#884

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: wriedmann@gmail.com (Wolfgang Riedmann)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: SQL long field names
Date: Mon, 12 Jul 2021 16:23:35 +0200
Lines: 22
Message-ID: <il31j9F1ss6U1@mid.individual.net>
References: <b2294a19-f5b8-44e8-b474-416249d349c7n@googlegroups.com> <ikdreqFu46iU1@mid.individual.net> <3e814551-8cd6-41e6-bc7e-91ebf9ac9029n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net AQrwQDptzW1zOX1S6P6tIQLbxUCXHaKYSoInu/jxqifst+sm4=
Cancel-Lock: sha1:T5Hi16LGnuvkNwkx7nk2y1++LUM=
User-Agent: XanaNews/1.18.1.6
 by: Wolfgang Riedmann - Mon, 12 Jul 2021 14:23 UTC

Hi Henry,

> An internal array could be a logical idea, until someone changes the
> original names of the SQL in the host. Dbs_Alias gave me little
> help. After assigning FieldInfo(Dbs_Alias, ...), the next time the
> file is opened, the alias has back the field name.

of course, this is not a permanent option, so you have to store the
aliases somewhere in a persistent manner

> Interesting: dbCreate() truncate the original field´s names, and
> build a db with few fields which have the same name.

the DBF data structure limits the field names to 10 bytes, so changing
that in the format would break backwards compatibility.
AFAIK FoxPro has done something like this, but they have have an
external file with the supplemental informations.

Wolfgang

--

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor