Create in access

J

Jeff

Ok. I am creating a table in an access DB based on a form submission. This
works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as "The" only.
SO I am guessing it stops when there is a space in the name. Is there some
way to get around this??
Jeff
 
B

Bob Lehmann

Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a crappy
way of doing things and will result in more headaches than it's worth.

Bob.
 
J

Jeff

I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would look
pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff

Bob Lehmann said:
Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a crappy
way of doing things and will result in more headaches than it's worth.

Bob.


Jeff said:
Ok. I am creating a table in an access DB based on a form submission. This
works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as "The" only.
SO I am guessing it stops when there is a space in the name. Is there some
way to get around this??
Jeff
 
B

Bob Barrows [MVP]

Think "outside the box". There is no reason that the text displayed on the
page has to match the database object names ...

Bob Barrows
 
J

Jeff

LOL. i am trying to get better at that


Bob Barrows said:
Think "outside the box". There is no reason that the text displayed on the
page has to match the database object names ...

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
B

Bob Lehmann

uh, yeah. If you say so.

What makes you think that the actual table name has to be displayed?

I've followed your previous threads on this tournament database of yours,
and you seem hellbent on employing bad practices - against the advice of
people who know better -, creating problems, and then coming up with goofy
work-arounds for the problems instead of fixing them.

Why is that?

Bob Lehmann

Jeff said:
I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would look
pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff

Bob Lehmann said:
Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a crappy
way of doing things and will result in more headaches than it's worth.

Bob.


Jeff said:
Ok. I am creating a table in an access DB based on a form submission. This
works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as "The" only.
SO I am guessing it stops when there is a space in the name. Is there some
way to get around this??
Jeff
 
J

Jeff

Well... if you look at one of my last posts about that tourney DB, I did say
that I changed to be like they instructed. I learned the hard way on that.
The only other thing that I am doing different, is creating a folder with
the tourney ID. But I am still learning this stuff, and yes.. I do have a
hard head about somethings. But I usually end up doing what was requested. I
guess I call it learning the hard way.
Jeff

Bob Lehmann said:
uh, yeah. If you say so.

What makes you think that the actual table name has to be displayed?

I've followed your previous threads on this tournament database of yours,
and you seem hellbent on employing bad practices - against the advice of
people who know better -, creating problems, and then coming up with goofy
work-arounds for the problems instead of fixing them.

Why is that?

Bob Lehmann

Jeff said:
I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would look
pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff

Bob Lehmann said:
Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a crappy
way of doing things and will result in more headaches than it's worth.

Bob.


Ok. I am creating a table in an access DB based on a form
submission.
This
works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as "The"
only.
SO I am guessing it stops when there is a space in the name. Is
there
some
way to get around this??
Jeff
 
D

David C. Holley

And we still haven't answered the original question, which I believe is
quite valid because there are instances where inserting values with
spaces is warranted and NOT the symptom of a bad db design. (How many
times have you seen a street address without spaces as in "5490 Willard
Norris Road"?)

I seem to recall encountering this problem before, but when I looked
around my pages, I could find where I had the problem. Hopefully, I've
gotten the thread back on track which at least should help you get the
answer.

David H
Well... if you look at one of my last posts about that tourney DB, I did say
that I changed to be like they instructed. I learned the hard way on that.
The only other thing that I am doing different, is creating a folder with
the tourney ID. But I am still learning this stuff, and yes.. I do have a
hard head about somethings. But I usually end up doing what was requested. I
guess I call it learning the hard way.
Jeff

uh, yeah. If you say so.

What makes you think that the actual table name has to be displayed?

I've followed your previous threads on this tournament database of yours,
and you seem hellbent on employing bad practices - against the advice of
people who know better -, creating problems, and then coming up with goofy
work-arounds for the problems instead of fixing them.

Why is that?

Bob Lehmann

I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would
look
pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff


Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a
crappy

way of doing things and will result in more headaches than it's worth.

Bob.



Ok. I am creating a table in an access DB based on a form
submission.
This

works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as
"The"
only.

SO I am guessing it stops when there is a space in the name. Is
there
some

way to get around this??
Jeff
 
B

Bob Lehmann

We did answer the question - "Don't allow spaces in DB tablle names."!

Allowing a DB to have table and column names with spaces IS bad design.

The problem isn't with the value, but what it is being used for. There is a
big difference between an Address and a DB Table name.

Would you categorize ALLOWING alphas in a phone number column as bad data,
or bad design?

PS - The thread was never "off track". He made a bad design decision and was
given alternatives to fix or kludge his *design*.

Bob Lehmann

David C. Holley said:
And we still haven't answered the original question, which I believe is
quite valid because there are instances where inserting values with
spaces is warranted and NOT the symptom of a bad db design. (How many
times have you seen a street address without spaces as in "5490 Willard
Norris Road"?)

I seem to recall encountering this problem before, but when I looked
around my pages, I could find where I had the problem. Hopefully, I've
gotten the thread back on track which at least should help you get the
answer.

David H
Well... if you look at one of my last posts about that tourney DB, I did say
that I changed to be like they instructed. I learned the hard way on that.
The only other thing that I am doing different, is creating a folder with
the tourney ID. But I am still learning this stuff, and yes.. I do have a
hard head about somethings. But I usually end up doing what was requested. I
guess I call it learning the hard way.
Jeff

uh, yeah. If you say so.

What makes you think that the actual table name has to be displayed?

I've followed your previous threads on this tournament database of yours,
and you seem hellbent on employing bad practices - against the advice of
people who know better -, creating problems, and then coming up with goofy
work-arounds for the problems instead of fixing them.

Why is that?

Bob Lehmann


I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would
look

pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff


Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a

crappy

way of doing things and will result in more headaches than it's worth.

Bob.



Ok. I am creating a table in an access DB based on a form
submission.

This

works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as
"The"

only.

SO I am guessing it stops when there is a space in the name. Is
there

some

way to get around this??
Jeff
 
B

Bob Lehmann

I guess you must get paid by the hour.

Good luck with your learning the hard way.

Bob Lehmann

Jeff said:
Well... if you look at one of my last posts about that tourney DB, I did say
that I changed to be like they instructed. I learned the hard way on that.
The only other thing that I am doing different, is creating a folder with
the tourney ID. But I am still learning this stuff, and yes.. I do have a
hard head about somethings. But I usually end up doing what was requested. I
guess I call it learning the hard way.
Jeff

Bob Lehmann said:
uh, yeah. If you say so.

What makes you think that the actual table name has to be displayed?

I've followed your previous threads on this tournament database of yours,
and you seem hellbent on employing bad practices - against the advice of
people who know better -, creating problems, and then coming up with goofy
work-arounds for the problems instead of fixing them.

Why is that?

Bob Lehmann

Jeff said:
I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would look
pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff

Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a crappy
way of doing things and will result in more headaches than it's worth.

Bob.


Ok. I am creating a table in an access DB based on a form submission.
This
works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as "The"
only.
SO I am guessing it stops when there is a space in the name. Is there
some
way to get around this??
Jeff
 
J

Jeff

Well. I use access DB for my stuff. And when you are looking at the tables..
with the DB opened, if you right click a table and click save as.... it
automatically gives you the option of " copy of tablename". and that itself
has spaces in it. But anyway, I do understand what you mean my bad design.
It makes things a lot easier without the spaces.
Thanks again
Jeff


Bob Lehmann said:
We did answer the question - "Don't allow spaces in DB tablle names."!

Allowing a DB to have table and column names with spaces IS bad design.

The problem isn't with the value, but what it is being used for. There is a
big difference between an Address and a DB Table name.

Would you categorize ALLOWING alphas in a phone number column as bad data,
or bad design?

PS - The thread was never "off track". He made a bad design decision and was
given alternatives to fix or kludge his *design*.

Bob Lehmann

David C. Holley said:
And we still haven't answered the original question, which I believe is
quite valid because there are instances where inserting values with
spaces is warranted and NOT the symptom of a bad db design. (How many
times have you seen a street address without spaces as in "5490 Willard
Norris Road"?)

I seem to recall encountering this problem before, but when I looked
around my pages, I could find where I had the problem. Hopefully, I've
gotten the thread back on track which at least should help you get the
answer.

David H
did
have
a
hard head about somethings. But I usually end up doing what was requested. I
guess I call it learning the hard way.
Jeff


uh, yeah. If you say so.

What makes you think that the actual table name has to be displayed?

I've followed your previous threads on this tournament database of yours,
and you seem hellbent on employing bad practices - against the advice of
people who know better -, creating problems, and then coming up with goofy
work-arounds for the problems instead of fixing them.

Why is that?

Bob Lehmann


I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would

look

pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff


Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a

crappy

way of doing things and will result in more headaches than it's worth.

Bob.



Ok. I am creating a table in an access DB based on a form

submission.

This

works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as

"The"

only.

SO I am guessing it stops when there is a space in the name. Is

there

some

way to get around this??
Jeff
 
D

dlbjr

If by chance you turn on the system tables in an access database, you will find that your tables and
queries in the MSysObjects table are just items in a system table. This is used to give your table
name a unique ID. So the name you actually give it means nothing. This is how JET Ticks. This is
built to allow names with spaces for boneheads.


dlbjr
Pleading sagacious indoctrination!
 
J

Jeff

Ahhh.. well, that explains a bunch. Well, I started learning this stuff on
my own, been doing it for a short time. So all the advice you all give me
does not go to waste.
And it is much appreciated.
Jeff
 
B

Bob Barrows [MVP]

David said:
And we still haven't answered the original question, which I believe
is
quite valid because there are instances where inserting values with
spaces is warranted and NOT the symptom of a bad db design. (How many
times have you seen a street address without spaces as in "5490
Willard Norris Road"?)

David,
I must respectfully disagree.
The problem was not about inserting/displaying data with spaces: it was
about the creation of database objects with spaces in their names. This
question certainly was dealt with, and the OP did solve his problem.

Bob Barrows
 
B

Bob Lehmann

PS - Who exactly is it that you seem to think is "chasing rabbits", Alice?

Bob Lehmann

David C. Holley said:
And we still haven't answered the original question, which I believe is
quite valid because there are instances where inserting values with
spaces is warranted and NOT the symptom of a bad db design. (How many
times have you seen a street address without spaces as in "5490 Willard
Norris Road"?)

I seem to recall encountering this problem before, but when I looked
around my pages, I could find where I had the problem. Hopefully, I've
gotten the thread back on track which at least should help you get the
answer.

David H
Well... if you look at one of my last posts about that tourney DB, I did say
that I changed to be like they instructed. I learned the hard way on that.
The only other thing that I am doing different, is creating a folder with
the tourney ID. But I am still learning this stuff, and yes.. I do have a
hard head about somethings. But I usually end up doing what was requested. I
guess I call it learning the hard way.
Jeff

uh, yeah. If you say so.

What makes you think that the actual table name has to be displayed?

I've followed your previous threads on this tournament database of yours,
and you seem hellbent on employing bad practices - against the advice of
people who know better -, creating problems, and then coming up with goofy
work-arounds for the problems instead of fixing them.

Why is that?

Bob Lehmann


I have a captain on my team that picks the future courses that we play.
After he picks them, they display on a course listing page. It would
look

pretty crappy for courses to look like "The_Island" or TheIsland"

I figured out I could use a replace for this... such as:

variable = Replace(Request.Form("course") , " ", "_")

Thx
Jeff


Why not just disallow spaces to begin with, and avoid the problems?

You may be able to put the name in [] - [The Island]. But, that's a

crappy

way of doing things and will result in more headaches than it's worth.

Bob.



Ok. I am creating a table in an access DB based on a form
submission.

This

works fine. The problem I am having is, if there is a space in the
submission. For example.... someone submits "The Island"
when the asp script uses SQL to create the DB, it creates it as
"The"

only.

SO I am guessing it stops when there is a space in the name. Is
there

some

way to get around this??
Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top