|
|
|
ASP and database question |
| message from Seth Meranda on 19 Jul 2004 |
I was working in an access database and updated some information in one of
my columns. I removed information from the column for some of the records..
Now when I attempt to view the information in the database through a
VBSscript ASP page, I get an error.
This is my error type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested
operation must contain a current record.
Did I mess up my database? What did I do wrong?
Seth
web<at>meranda.org
|
| two can's replied to Seth Meranda on 20 Jul 2004 |
Hi yea,
maybe this can be of help, it is about if then else statements , i.e if no
record then show this .... if you know what I mean any way the tutorial is
eaisly understood.
http://www.webthang.co.uk/tuts/tuts_dmx/showhide/showhide1.asp
regards
twocan's
"Seth Meranda" <web@meranda.org> wrote in message
news:cdi21p$bps$1@forums.macromedia.com...
|
| Les Matthews replied to Seth Meranda on 20 Jul 2004 |
What is the SQL in your SELECT?
Are you viewing a page that has a repeat region to display all records, or a
page that displays a single record? Do you have something like "WHERE Record
ID = somevariable", and that record ID was one of the ones deleted?
"Seth Meranda" <web@meranda.org> wrote in message
news:cdi21p$bps$1@forums.macromedia.com...
|
| Seth Meranda replied to Les Matthews on 20 Jul 2004 |
I am doing a repeat all records. I do have a "WHERE Record ID = 001" and
some of the data in this column is deleted and empty. The cells that do have
something in this column have "001" or nothing at all.
"Les Matthews" <lesamatthews@yahoo.com> wrote in message
news:cdjaso$3j1$1@forums.macromedia.com...
|
| Les Matthews replied to Seth Meranda on 20 Jul 2004 |
You're using a repeat region, but filtering your recordset to display only
one record???
It sounds like need to either insert something into the columns that are
null, or handle them by wrapping with an IF statement causing those fields
to display only if they are not null. You cannot instruct IIS to display
something that does not exist.
"Seth Meranda" <smeranda@4w.com> wrote in message
news:cdk4ol$6ps$1@forums.macromedia.com...
|
| Seth Meranda replied to Les Matthews on 20 Jul 2004 |
I have 85 students that can register for classes. I have 25 different
classes. Each student can register for more than one class, in fact they can
register for all twenty-five classes. I want to put the classes they
registered for in a database, and then create an .asp page based on the
database with class rosters.
Currently I have given each class a column in the database. Then when they
register for a class, the class code (001, 002, 003, etc...) is inserted
into the appropriate column. If they do not register for a certain class,
nothing is entered in the class's column.
Am I creating the database appropriately?
"Les Matthews" <lesamatthews@yahoo.com> wrote in message
news:cdk6kh$8n0$1@forums.macromedia.com...
|
| Les Matthews replied to Seth Meranda on 21 Jul 2004 |
Students (this table contains fields to describe each student)
Classes (this table contains fields to describe each class)
Registrations (this table is used to join students with classes. It needs
only two fields - StudentID and ClassID)
For instance, the Students table might look like (with whatever additional
fields you need to fully describe each student):
StudentID LastName FirstName
|
| Seth Meranda replied to Les Matthews on 21 Jul 2004 |
Ahhh,
Now this is becoming more clear. But how do I use .asp to assign each
student to a class? When I create a form, it only allows me to update one
table. I realize there is a relationship built into the third table, but I
don't understand how the third table knows to put student 001 in classes 001
and 003.
Seth Meranda
web<at>meranda.org
"Les Matthews" <lesamatthews@yahoo.com> wrote in message
news:cdmbcj$1td$1@forums.macromedia.com...
|
| Craig replied to Seth Meranda on 20 Jul 2004 |
ASP will generally display errors if you view a page with empty column data,
NULL values.
Therefore you can hide these regions of the page using the standard server
behaviour - show region if - shows or hides the region if the recordset is
empty
you can also download from the MM site conditional regions which can be used
to hide particular column data on criteria, show if true, 12, false, Fred,
etc
Craig
"Seth Meranda" <web@meranda.org> wrote in message
news:cdi21p$bps$1@forums.macromedia.com...
|
| Seth Meranda replied to Craig on 19 Jul 2004 |
Where can I find these conditional regions on the MM site, I'm not having
much luck.
My problem is that I am not trying to show data which doesn't exist in the
DB. I am doing a search through a database column, and if the record "001"
exists, then the page will display that record. The problem is that some of
the records have no data in this column. That is where I am having troubles.
These columns had data, then I deleted the data manually. Now the ASP page
doesn't work. I attempted to use the display if the recordset is empty
behavior, but that did not help.
Seth
"Craig" <csintheuk@hotmail.com> wrote in message
news:cdi3b1$d2l$1@forums.macromedia.com...
|
| Craig replied to Seth Meranda on 20 Jul 2004 |
Seth,
search the mm site http://www.macromedia.com/cfusion/exchange for
conditional region
"I attempted to use the display if the recordset is empty behaviour, but
that did not help."
If used correctly, this can only be if the recordset has data for the
desired criteria, but not all columns are full; or there is no record 001,
thus the columns on the page are empty, which ASP doesn't like much.
A. As I get it, record 1 has 10 columns all full. The page is fine
A. Record 2 has 10 columns, 5 empty, 5 full. The page is NOT fine.
B. Record 3 has 10 columns, none matching the search criteria
A. You need to hide the missing column data but not the entire record.
So, you need the files from the MM site, as shown above.
B. Hide the region on the page , as in Show if Recordset is Not Empty
Craig
PS. yr Access db is, I'm sure, just fine and dandy and healthy and ....
"Seth Meranda" <web@meranda.org> wrote in message
news:cdi45b$dte$1@forums.macromedia.com...
|
|