469,352 Members | 1,641 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

access databse

Ok, here is something strange.

For a webpage that I have, I used to keep a list of names and email address
in a delimited text file. Then for some reason, my host company did
somethign and now my page can not read teh text file, but it can write to
it. Go figure that one.

ANyway, So I created an access database to replace teh text file and I
imported the data straight from the Text file.

Everythign looks good again.
It reads all the info from teh database perfectly.
select * from email order by fname

I go to add another name and email address via my web page and when I go
back to the page that lists everythign, it does not show the new entry.
Yet, if I open my database in Access, it is there so it saved correctly.
And if my select statement is select * from email where fname = '" John "'
order by fname

then it will display the newest entry
(Which by the way is John Doe)

ANy Idea why the new entry will not display?
Jul 19 '05 #1
13 2032
Did you hit Ctrl+Refresh when you reloaded the page? Also see
http://www.aspfaq.com/2022

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:##**************@TK2MSFTNGP09.phx.gbl...
Ok, here is something strange.

For a webpage that I have, I used to keep a list of names and email address in a delimited text file. Then for some reason, my host company did
somethign and now my page can not read teh text file, but it can write to
it. Go figure that one.

ANyway, So I created an access database to replace teh text file and I
imported the data straight from the Text file.

Everythign looks good again.
It reads all the info from teh database perfectly.
select * from email order by fname

I go to add another name and email address via my web page and when I go
back to the page that lists everythign, it does not show the new entry.
Yet, if I open my database in Access, it is there so it saved correctly.
And if my select statement is select * from email where fname = '" John "' order by fname

then it will display the newest entry
(Which by the way is John Doe)

ANy Idea why the new entry will not display?

Jul 19 '05 #2
Also, make sure that in your Browser you go to:
IE ex.
Tools
options
under temporary internet files click settings
and select "check for newer version of stored pages every
visit to the page".
this will work.
-----Original Message-----
Did you hit Ctrl+Refresh when you reloaded the page? Also seehttp://www.aspfaq.com/2022

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:##**************@TK2MSFTNGP09.phx.gbl...
Ok, here is something strange.

For a webpage that I have, I used to keep a list of names and email
address
in a delimited text file. Then for some reason, my
host company did somethign and now my page can not read teh text file, but it can write to it. Go figure that one.

ANyway, So I created an access database to replace teh text file and I imported the data straight from the Text file.

Everythign looks good again.
It reads all the info from teh database perfectly.
select * from email order by fname

I go to add another name and email address via my web page and when I go back to the page that lists everythign, it does not show the new entry.

Yet, if I open my database in Access, it is there so it saved correctly. And if my select statement is select * from email

where fname = '" John"'
order by fname

then it will display the newest entry
(Which by the way is John Doe)

ANy Idea why the new entry will not display?

.

Jul 19 '05 #3
I even tried this from a differnet computer.
So it isn't a page refresh issue.
Also, when I have it display the record count and display the first item in
the record, it duplicates the second to last record info twice.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:u0**************@TK2MSFTNGP09.phx.gbl...
Did you hit Ctrl+Refresh when you reloaded the page? Also see
http://www.aspfaq.com/2022

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:##**************@TK2MSFTNGP09.phx.gbl...
Ok, here is something strange.

For a webpage that I have, I used to keep a list of names and email address
in a delimited text file. Then for some reason, my host company did
somethign and now my page can not read teh text file, but it can write to it. Go figure that one.

ANyway, So I created an access database to replace teh text file and I
imported the data straight from the Text file.

Everythign looks good again.
It reads all the info from teh database perfectly.
select * from email order by fname

I go to add another name and email address via my web page and when I go
back to the page that lists everythign, it does not show the new entry.
Yet, if I open my database in Access, it is there so it saved correctly.
And if my select statement is select * from email where fname = '"

John "'
order by fname

then it will display the newest entry
(Which by the way is John Doe)

ANy Idea why the new entry will not display?


Jul 19 '05 #4
http://65.160.89.126/john/email/index.asp
There are at least 110 records, but it only shows 109.
"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:u0**************@TK2MSFTNGP09.phx.gbl...
Did you hit Ctrl+Refresh when you reloaded the page? Also see
http://www.aspfaq.com/2022

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:##**************@TK2MSFTNGP09.phx.gbl...
Ok, here is something strange.

For a webpage that I have, I used to keep a list of names and email address
in a delimited text file. Then for some reason, my host company did
somethign and now my page can not read teh text file, but it can write to it. Go figure that one.

ANyway, So I created an access database to replace teh text file and I
imported the data straight from the Text file.

Everythign looks good again.
It reads all the info from teh database perfectly.
select * from email order by fname

I go to add another name and email address via my web page and when I go
back to the page that lists everythign, it does not show the new entry.
Yet, if I open my database in Access, it is there so it saved correctly.
And if my select statement is select * from email where fname = '"

John "'
order by fname

then it will display the newest entry
(Which by the way is John Doe)

ANy Idea why the new entry will not display?


Jul 19 '05 #5
> I even tried this from a differnet computer.
So it isn't a page refresh issue.


Did you read the whole article I sent?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #6
Yes I read it.
I even added the code they showed

<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>

I even went so far as to restart the Machine that is hosting the pages.
Still it only shows the first 109 records.
If I have it sort by a differnet field, it will show the newly added
records, but then it wont show a couple of other records.


"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
I even tried this from a differnet computer.
So it isn't a page refresh issue.


Did you read the whole article I sent?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #7
When I do a response.write for the Record count, it tells me, 111.
When I take out the line that says "On error resume next"
After it displays record 109, I get an error that is complaing about EOF
being true.

If I sort it differently, it will list record 110 and 111, but it will leave
out what would be the last 2 records that are in the database.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
I even tried this from a differnet computer.
So it isn't a page refresh issue.


Did you read the whole article I sent?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #8
Instead of narrating, can you show the actual code you're talking about?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
When I do a response.write for the Record count, it tells me, 111.
When I take out the line that says "On error resume next"
After it displays record 109, I get an error that is complaing about EOF
being true.

If I sort it differently, it will list record 110 and 111, but it will leave out what would be the last 2 records that are in the database.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
I even tried this from a differnet computer.
So it isn't a page refresh issue.


Did you read the whole article I sent?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


Jul 19 '05 #9
"johnfli" <jo**@here.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
When I do a response.write for the Record count, it tells me, 111.
When I take out the line that says "On error resume next"
After it displays record 109, I get an error that is complaing about EOF being true.

If I sort it differently, it will list record 110 and 111, but it will leave out what would be the last 2 records that are in the database.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
I even tried this from a differnet computer.
So it isn't a page refresh issue.


Did you read the whole article I sent?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


Seems to work just fine. Note, record 111 is listed as "Jane Doe".
Similarly, record 110 is listed as "John Doe". As such, they appear in
the middle of the list. Also, please remove record 112. That was me. ;-)

HTH
-Chris Hohmann

Jul 19 '05 #10
OK, here you go.
I am just including the asp stuff as I don't think you need to see teh HTML
junk, unless you really want to.

This is at the very top of my asp page;

<%@ LANGUAGE=VBSCRIPT %>
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>

html stuff in here

then;
<%
Dim strSortOrder
dim objConn
dim rsUsers
dim strUserSQL

strSortOrder=request("Sort")
if trim(strSortOrder) = "" then
strSortOrder = "FName"
end if

Set objConn = Server.CreateObject ("ADODB.Connection")
Set rsUsers = Server.CreateObject ("ADODB.Recordset")

strUserSQL = "SELECT Email.ID, Email.Fname, Email.Lname, Email.email,
Email.year, Email.city, Email.state FROM Email order by " & strSortOrder
objConn.Open "DSN=IVHS_Email"
rsUsers.Open strUserSQL, objConn, 3,3

response.write "==== " & rsUsers.Recordcount & " ====="

strRecordCount = rsUsers.Recordcount
If not (rsUsers.BOF and rsUsers.EOF) then
rsUsers.movelast
rsUsers.movefirst

do until rsUsers.eof = true
%>

Then the html stuff that displays the info goes here
then at the end is;
<%

rsUsers.moveNext
loop
end if

%>


"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uc**************@TK2MSFTNGP11.phx.gbl...
Instead of narrating, can you show the actual code you're talking about?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
When I do a response.write for the Record count, it tells me, 111.
When I take out the line that says "On error resume next"
After it displays record 109, I get an error that is complaing about EOF
being true.

If I sort it differently, it will list record 110 and 111, but it will

leave
out what would be the last 2 records that are in the database.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
> I even tried this from a differnet computer.
> So it isn't a page refresh issue.

Did you read the whole article I sent?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/



Jul 19 '05 #11
When you have it sorting by first name, it lists all 112 items in order?
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:up**************@TK2MSFTNGP11.phx.gbl...
"johnfli" <jo**@here.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
When I do a response.write for the Record count, it tells me, 111.
When I take out the line that says "On error resume next"
After it displays record 109, I get an error that is complaing about

EOF
being true.

If I sort it differently, it will list record 110 and 111, but it will

leave
out what would be the last 2 records that are in the database.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
> I even tried this from a differnet computer.
> So it isn't a page refresh issue.

Did you read the whole article I sent?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


Seems to work just fine. Note, record 111 is listed as "Jane Doe".
Similarly, record 110 is listed as "John Doe". As such, they appear in
the middle of the list. Also, please remove record 112. That was me. ;-)

HTH
-Chris Hohmann

Jul 19 '05 #12
Forgot one thing;
to get the EOF error I used

"for intRecord = 0 to strRecordCount -1"

in place of the "do until rsUsers.eof = true"

Then naturally I had a "next" in place of the "loop"
So in doing that, I would get the error when it hit rsUsers.moveNext for
record 110
"johnfli" <jo**@here.com> wrote in message
news:uj**************@TK2MSFTNGP11.phx.gbl...
OK, here you go.
I am just including the asp stuff as I don't think you need to see teh HTML junk, unless you really want to.

This is at the very top of my asp page;

<%@ LANGUAGE=VBSCRIPT %>
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>

html stuff in here

then;
<%
Dim strSortOrder
dim objConn
dim rsUsers
dim strUserSQL

strSortOrder=request("Sort")
if trim(strSortOrder) = "" then
strSortOrder = "FName"
end if

Set objConn = Server.CreateObject ("ADODB.Connection")
Set rsUsers = Server.CreateObject ("ADODB.Recordset")

strUserSQL = "SELECT Email.ID, Email.Fname, Email.Lname, Email.email,
Email.year, Email.city, Email.state FROM Email order by " & strSortOrder
objConn.Open "DSN=IVHS_Email"
rsUsers.Open strUserSQL, objConn, 3,3

response.write "==== " & rsUsers.Recordcount & " ====="

strRecordCount = rsUsers.Recordcount
If not (rsUsers.BOF and rsUsers.EOF) then
rsUsers.movelast
rsUsers.movefirst

do until rsUsers.eof = true
%>

Then the html stuff that displays the info goes here
then at the end is;
<%

rsUsers.moveNext
loop
end if

%>


"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uc**************@TK2MSFTNGP11.phx.gbl...
Instead of narrating, can you show the actual code you're talking about?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
When I do a response.write for the Record count, it tells me, 111.
When I take out the line that says "On error resume next"
After it displays record 109, I get an error that is complaing about EOF being true.

If I sort it differently, it will list record 110 and 111, but it will

leave
out what would be the last 2 records that are in the database.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
> > I even tried this from a differnet computer.
> > So it isn't a page refresh issue.
>
> Did you read the whole article I sent?
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>



Jul 19 '05 #13
Sorry all, I found the problem.

It was me.

I thought is was sorting by the ID field, but it was sorting by the First
Name.

So as a result, record 109's first name start with a 'V' thus meaning that
it will always be last.

I thank you for your assistance with me. Sorry it turned out to be an
ignorance issue.

"johnfli" <jo**@here.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
Forgot one thing;
to get the EOF error I used

"for intRecord = 0 to strRecordCount -1"

in place of the "do until rsUsers.eof = true"

Then naturally I had a "next" in place of the "loop"
So in doing that, I would get the error when it hit rsUsers.moveNext for
record 110
"johnfli" <jo**@here.com> wrote in message
news:uj**************@TK2MSFTNGP11.phx.gbl...
OK, here you go.
I am just including the asp stuff as I don't think you need to see teh

HTML
junk, unless you really want to.

This is at the very top of my asp page;

<%@ LANGUAGE=VBSCRIPT %>
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>

html stuff in here

then;
<%
Dim strSortOrder
dim objConn
dim rsUsers
dim strUserSQL

strSortOrder=request("Sort")
if trim(strSortOrder) = "" then
strSortOrder = "FName"
end if

Set objConn = Server.CreateObject ("ADODB.Connection")
Set rsUsers = Server.CreateObject ("ADODB.Recordset")

strUserSQL = "SELECT Email.ID, Email.Fname, Email.Lname, Email.email,
Email.year, Email.city, Email.state FROM Email order by " & strSortOrder
objConn.Open "DSN=IVHS_Email"
rsUsers.Open strUserSQL, objConn, 3,3

response.write "==== " & rsUsers.Recordcount & " ====="

strRecordCount = rsUsers.Recordcount
If not (rsUsers.BOF and rsUsers.EOF) then
rsUsers.movelast
rsUsers.movefirst

do until rsUsers.eof = true
%>

Then the html stuff that displays the info goes here
then at the end is;
<%

rsUsers.moveNext
loop
end if

%>


"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uc**************@TK2MSFTNGP11.phx.gbl...
Instead of narrating, can you show the actual code you're talking about?
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"johnfli" <jo**@here.com> wrote in message
news:OJ**************@tk2msftngp13.phx.gbl...
> When I do a response.write for the Record count, it tells me, 111.
> When I take out the line that says "On error resume next"
> After it displays record 109, I get an error that is complaing about EOF > being true.
>
> If I sort it differently, it will list record 110 and 111, but it will leave
> out what would be the last 2 records that are in the database.
>
>
>
>
>
> "Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
> news:Oh**************@tk2msftngp13.phx.gbl...
> > > I even tried this from a differnet computer.
> > > So it isn't a page refresh issue.
> >
> > Did you read the whole article I sent?
> >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > http://www.aspfaq.com/
> >
> >
>
>



Jul 19 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by ugo_lavoie | last post: by
4 posts views Thread by Supa Hoopsa | last post: by
1 post views Thread by pic078 via AccessMonster.com | last post: by
3 posts views Thread by Bgreer5050 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.