A
Atreju
Sorry for the very wide cross-post, if anyone requests, I can pull the
post from any given group. I just think this is a Q for all of these
groups! Also, I apologize for the length of this post, but I really
have a few dilemmas on my mind, and I'd greatly appreciate anyone who
has the patience to sift through it all. I hope I organized my
thoughts well.
I have several questions amongst explanations, so I will put a Q: by a
question. Thanks.
I have a VB Application that is an ongoing project.
One sticky situation is that I have a production version and a working
version. The working version uses my live data which I actually need
(aghast! a Developer using his own product before it is done! :0).
Therefore I really want to get this refined in the production version
before I change the database structure of the working version. The VB
front-end I can do whatever with but these questions are mostly about
the database.
I have one main table. As of today it had 21 fields. I am adding a few
(so far it is up to 27 and I anticipate approximately 3 or 4 more. No,
there's really no relevant way to split it up - it is all part of a
single transaction record which just has lots of information).
My problems are thus:
First bad situation is in the front-end, I am using data-bound
controls (horrors! I will try to change this in the future). I LIKE to
keep my controls in tandem with my fields - eg: TextBox(6) is
adoRecordset.Fields(6) - but somehow I feel this is a futile effort,
because one can never be certain of the table structure in the future.
I have added fields to the Table which are more closely related (not
in the database term "related" but more in the characteristic of the
data in that field) to fields that already exist higher up in the
table (lower field index). For example: Name,Address1,City,etc. or
ListDate,ListTime,ListPrice etc.
Q: My major concern is: Does this really matter? Adding fields later
in the table? I actually re-ordered them once before when I added a
field but doing so again would mean a ton of Search&Replaces in the VB
code.
On some Forms, I have, in the past, taken a shortcut once in a while
and tested the contents of a field by referring to the
Recordset.Fields(index) where index was the index of a particular
control. I did this because I knew they were matched. But I realize
this is _very_ bad practice, so I may as well get used to NOT doing
that.
Q: In one form, I have a HFlexGrid. In this form, I wonder if I use
"SELECT * FROM Table" - is there, then, any way to re-order the
columns, or do I have to "SELECT Field1, Field5,Field2,Field9,etc." in
the order I want them? How is the best way to approach this situation?
I REALLY appreciate greatly any advice anyone can give me. I know it
sounds like I'm practically asking for Database 102 lessons here, but
my knowledge is growing and I just need a few boosts once in a while.
Please tell me if there is anything I've asked that's not too clear,
or if you need more info.
I thank you VERY much for any help anyone can give.
-Dan
---Atreju---
post from any given group. I just think this is a Q for all of these
groups! Also, I apologize for the length of this post, but I really
have a few dilemmas on my mind, and I'd greatly appreciate anyone who
has the patience to sift through it all. I hope I organized my
thoughts well.
I have several questions amongst explanations, so I will put a Q: by a
question. Thanks.
I have a VB Application that is an ongoing project.
One sticky situation is that I have a production version and a working
version. The working version uses my live data which I actually need
(aghast! a Developer using his own product before it is done! :0).
Therefore I really want to get this refined in the production version
before I change the database structure of the working version. The VB
front-end I can do whatever with but these questions are mostly about
the database.
I have one main table. As of today it had 21 fields. I am adding a few
(so far it is up to 27 and I anticipate approximately 3 or 4 more. No,
there's really no relevant way to split it up - it is all part of a
single transaction record which just has lots of information).
My problems are thus:
First bad situation is in the front-end, I am using data-bound
controls (horrors! I will try to change this in the future). I LIKE to
keep my controls in tandem with my fields - eg: TextBox(6) is
adoRecordset.Fields(6) - but somehow I feel this is a futile effort,
because one can never be certain of the table structure in the future.
I have added fields to the Table which are more closely related (not
in the database term "related" but more in the characteristic of the
data in that field) to fields that already exist higher up in the
table (lower field index). For example: Name,Address1,City,etc. or
ListDate,ListTime,ListPrice etc.
Q: My major concern is: Does this really matter? Adding fields later
in the table? I actually re-ordered them once before when I added a
field but doing so again would mean a ton of Search&Replaces in the VB
code.
On some Forms, I have, in the past, taken a shortcut once in a while
and tested the contents of a field by referring to the
Recordset.Fields(index) where index was the index of a particular
control. I did this because I knew they were matched. But I realize
this is _very_ bad practice, so I may as well get used to NOT doing
that.
Q: In one form, I have a HFlexGrid. In this form, I wonder if I use
"SELECT * FROM Table" - is there, then, any way to re-order the
columns, or do I have to "SELECT Field1, Field5,Field2,Field9,etc." in
the order I want them? How is the best way to approach this situation?
I REALLY appreciate greatly any advice anyone can give me. I know it
sounds like I'm practically asking for Database 102 lessons here, but
my knowledge is growing and I just need a few boosts once in a while.
Please tell me if there is anything I've asked that's not too clear,
or if you need more info.
I thank you VERY much for any help anyone can give.
-Dan
---Atreju---