473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 2101
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ugo_lavoie | last post by:
Hi there, i'm doing a databse right now and i want it to be secure, about 20-30 people (max) will be using it and it will be on a SQL server. My first question: I saw some web page about adding...
4
by: authorking | last post by:
I use the following code to insert a data record in to a datatable of an access database.But every time I execute the command, there will rise an exception and the insert operation can't be...
4
by: Supa Hoopsa | last post by:
I am in the process of rewriting an MS Access application (access front end with SQL 2k database) in VB.NET and one of the things I would like to do is link in to the compiled Access ADE so that I...
3
by: Jahangir | last post by:
I have made Access databse with all functions and forms. But now I want to generate executabel databse in which user does not have permission to change design of databse. How i can do this. PLz help.
1
by: pic078 via AccessMonster.com | last post by:
I have an Access databse file on my desktop. When I double-click the icon to open, a "locked" Access icon suddenly appears on the desktop indicating the databse is opening/has opened - but there...
1
by: pontypete | last post by:
Hi all Ive managed to create an ASP & ACCESS local site/databse, Now the aim: Membership Number = 1 Fname = Peter ^ everything in the databse, I want to beable to have a search box within...
3
by: Bgreer5050 | last post by:
I can use a form view, gridview and details view to see the data in my access databse, but i cannot edit or add to the database. What simple step am I missing?
3
by: MarkTingson | last post by:
hi scripters! is it possible in vb to transfer the table in a databse into an external memory disk? i just want to save ONLY THE TABLE but NOT THE ENTIRE DATABSE in a flashdisk! pls tell me how......
11
by: tokcy | last post by:
Hi everyone, I am new in php and ajax, i am facing the prob while i click on element of first drop down then in second dropdown all element showl come from database. I mean i have three dropdown 1....
1
by: PhiriM | last post by:
I am a programmer trying to use access database and forms to build an application. My problem is how to backup and restore the databse then how i may come up with my own custom menu. If anyone...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.