🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.dbexpress
Article #132

Dynamic MYSQL tables in datasets

#132
From: Max
Date: Tue, 08 Feb 2005 20:50
34 lines
2335 bytes
Hello,

I'm encountering a problem in the combination of MySQL and dbexpress in 
Borland C++Builder 6.
With one TSQLConnection and a couple of TSQLClientDataSets I've made an 
application. The TSQLClientDataSets are from the CommandType ctTable and 
the MySQL tablenames are loaded at runtime just before the datasets are 
opened. In fact the initial tables exist already in the database and 
their names have been put in the datasets at designtime already.
The idea is that I want to copy the database tables to new tables (in 
fact saving the old tables for later reference) and from then on use the 
new tables with the datasets.
The new tables are created using a TSQLQuery with the exact create SQL 
query MySql generates with a mysqldump.
I open a dataset with the old table and I use a separate destination 
dataset for the new table. This way I copy the data from the old table 
to the new copy.

So far so good.

The new tables have the same size and the same record count as the old 
ones and all seem well.

When the new tablenames get loaded in the datasets, these datasets 
behave differently than they did with the old tables! This changes when 
I enter the new tablenames at designtime in the IDE.
There is something that happens to the dataset if you define it at 
design time using a database table, what I couldn't duplicate by just 
putting the database tablename in the dataset.

What am I missing?

Regards,
Max
Technical Details
Message-ID: <42092632$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: fb4e2,8a94ac271044c9a3,start
X-Google-Attributes: gidfb4e2,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 08 Feb 2005 21:50:35 +0100
From: Max <nomail@4me.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: nl-NL, nl, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.dbexpress
Subject: Dynamic MYSQL tables in datasets
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 82.161.81.49
Message-ID: <42092632$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107895858 82.161.81.49 (8 Feb 2005 12:50:58 -0800)
Lines: 34
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail