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
13 2122
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=VBSCRI PT %>
<%
pStr = "private, no-cache, must-revalidate"
Response.Expire sAbsolute = #2000-01-01#
Response.AddHea der "pragma", "no-cache"
Response.AddHea der "cache-control", pStr
%>
html stuff in here
then;
<%
Dim strSortOrder
dim objConn
dim rsUsers
dim strUserSQL
strSortOrder=re quest("Sort")
if trim(strSortOrd er) = "" then
strSortOrder = "FName"
end if
Set objConn = Server.CreateOb ject ("ADODB.Connect ion")
Set rsUsers = Server.CreateOb ject ("ADODB.Records et")
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.Recordc ount & " ====="
strRecordCount = rsUsers.Recordc ount
If not (rsUsers.BOF and rsUsers.EOF) then
rsUsers.movelas t
rsUsers.movefir st
do until rsUsers.eof = true
%>
Then the html stuff that displays the info goes here
then at the end is;
<%
rsUsers.moveNex t
loop
end if
%>
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:uc******** ******@TK2MSFTN GP11.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.co m> wrote in message news:OJ******** ******@tk2msftn gp13.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***@TRASHasp faq.com> wrote in message news:Oh******** ******@tk2msftn gp13.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/
When you have it sorting by first name, it lists all 112 items in order?
"Chris Hohmann" <no****@thankyo u.com> wrote in message
news:up******** ******@TK2MSFTN GP11.phx.gbl... "johnfli" <jo**@here.co m> wrote in message news:OJ******** ******@tk2msftn gp13.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***@TRASHasp faq.com> wrote in message news:Oh******** ******@tk2msftn gp13.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
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.moveNex t for
record 110
"johnfli" <jo**@here.co m> wrote in message
news:uj******** ******@TK2MSFTN GP11.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=VBSCRI PT %> <% pStr = "private, no-cache, must-revalidate" Response.Expire sAbsolute = #2000-01-01# Response.AddHea der "pragma", "no-cache" Response.AddHea der "cache-control", pStr %>
html stuff in here
then; <% Dim strSortOrder dim objConn dim rsUsers dim strUserSQL
strSortOrder=re quest("Sort") if trim(strSortOrd er) = "" then strSortOrder = "FName" end if
Set objConn = Server.CreateOb ject ("ADODB.Connect ion") Set rsUsers = Server.CreateOb ject ("ADODB.Records et")
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.Recordc ount & " ====="
strRecordCount = rsUsers.Recordc ount
If not (rsUsers.BOF and rsUsers.EOF) then rsUsers.movelas t rsUsers.movefir st
do until rsUsers.eof = true
%>
Then the html stuff that displays the info goes here then at the end is;
<%
rsUsers.moveNex t loop end if
%> "Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message news:uc******** ******@TK2MSFTN GP11.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.co m> wrote in message news:OJ******** ******@tk2msftn gp13.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***@TRASHasp faq.com> wrote in message news:Oh******** ******@tk2msftn gp13.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/ > >
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.co m> wrote in message
news:us******** ******@tk2msftn gp13.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.moveNex t for record 110
"johnfli" <jo**@here.co m> wrote in message news:uj******** ******@TK2MSFTN GP11.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=VBSCRI PT %> <% pStr = "private, no-cache, must-revalidate" Response.Expire sAbsolute = #2000-01-01# Response.AddHea der "pragma", "no-cache" Response.AddHea der "cache-control", pStr %>
html stuff in here
then; <% Dim strSortOrder dim objConn dim rsUsers dim strUserSQL
strSortOrder=re quest("Sort") if trim(strSortOrd er) = "" then strSortOrder = "FName" end if
Set objConn = Server.CreateOb ject ("ADODB.Connect ion") Set rsUsers = Server.CreateOb ject ("ADODB.Records et")
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.Recordc ount & " ====="
strRecordCount = rsUsers.Recordc ount
If not (rsUsers.BOF and rsUsers.EOF) then rsUsers.movelas t rsUsers.movefir st
do until rsUsers.eof = true
%>
Then the html stuff that displays the info goes here then at the end is;
<%
rsUsers.moveNex t loop end if
%> "Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message news:uc******** ******@TK2MSFTN GP11.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.co m> wrote in message news:OJ******** ******@tk2msftn gp13.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***@TRASHasp faq.com> wrote in message > news:Oh******** ******@tk2msftn gp13.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/ > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 password to the
databse (group of people with the same rights and stuff like that) and
was wondering if it's good enough. (people who will use this databse
dont know much about computer but i dont want to be using the shift-s
method, i want...
|
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 completed.
here's the code:
System.Data.OleDb.OleDbConnection hist_cnn = new
System.Data.OleDb.OleDbConnection();
System.Data.OleDb.OleDbCommand hist_command = new
System.Data.OleDb.OleDbCommand();
|
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 can use the reports that have already been created. I have somewhere in the region of 200 reports already created in MS Access and I really don't want to have to create new ones.
I have successfully linked to the Access ADP, but would really like to...
|
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.
|
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 is no database window or startup
form in sight - seems like Access is freezing up for some reason - any ideas
as to why this is happening?
PS: I can get into the file by opening Access itself, then selecting
file>open, but I do not have...
| |
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 my ASP page and search for user records,
I have it displaying them all at the moment, and because ive just started it im using 3 Bogus I.D's,
|
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?
|
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... i've search the net for codes but i can't find anything.. i hope you will understand me.. this is for our thesis..
|
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. category which comes from database 2. brand which comes from databse according to content of first dropdown . and 3. price which is static.
when i am doing these things without ajax on every onChange() thw whole page is refreshing that i do not...
|
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 may explain the above to me, i will greatly appreciate.
Masiye Phiri
Ndola
Zambia
Central Africa
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |