473,320 Members | 2,071 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,320 software developers and data experts.

ASP and MS Access problem

When I enter data into my access db through the gui, my SQL Query
recognizes the data it is looking for and returns the result. ie I
enter "Dog" through the Access GUI and when my SQL query asks for
"Dog" it returns all the records with "Dog" in it.

The problem is if I enter "Dog" through my ASP web interface to
exactly the same database, I can see "Dog" in the table through the
gui, however when I run the SQL query, it only returns records with
"Dog" that were entered directly in through the Access GUI.

rs("BreakfastIncl") = BreakfastInclInput
rs("ConfCenter") = ConfCenterInput
rs("ConfCenterDescription") = ConfCentDescInput
rs("Distances") = DistancesInput
rs("File Name") = fileName
rs("File Size") = fileSize
rs("File Data").AppendChunk fileData
rs("Content Type") = contentType

rs("Subject")=nameInput
rs.Update

rs.Close
Set rs = Nothing

SQL Query = 'strSQL = "SELECT * FROM BIBS WHERE Suburb ='" &
Request.QueryString("link") & "' ORDER BY ID DESC"'
I am doing an rs.update - I can see the web entered "Dog" through the
gui - but the SQL query or the following line just does not see it.

If UCase(Trim(CStr(oRset("Suburb"))))=UCase(Trim(CStr (Request.QueryString("link"))))
then .....

I am very perplexed. Thanks
John
Jul 19 '05 #1
3 1456
Don't use Recordsets to update data. You need to update or add data directly
to the tables using an SQL "Update" or "Insert" command (depending on which
you are doing).
--

Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
"John" <jo**@hokykoky.com> wrote in message
news:5a**************************@posting.google.c om...
When I enter data into my access db through the gui, my SQL Query
recognizes the data it is looking for and returns the result. ie I
enter "Dog" through the Access GUI and when my SQL query asks for
"Dog" it returns all the records with "Dog" in it.

The problem is if I enter "Dog" through my ASP web interface to
exactly the same database, I can see "Dog" in the table through the
gui, however when I run the SQL query, it only returns records with
"Dog" that were entered directly in through the Access GUI.

rs("BreakfastIncl") = BreakfastInclInput
rs("ConfCenter") = ConfCenterInput
rs("ConfCenterDescription") = ConfCentDescInput
rs("Distances") = DistancesInput
rs("File Name") = fileName
rs("File Size") = fileSize
rs("File Data").AppendChunk fileData
rs("Content Type") = contentType

rs("Subject")=nameInput
rs.Update

rs.Close
Set rs = Nothing

SQL Query = 'strSQL = "SELECT * FROM BIBS WHERE Suburb ='" &
Request.QueryString("link") & "' ORDER BY ID DESC"'
I am doing an rs.update - I can see the web entered "Dog" through the
gui - but the SQL query or the following line just does not see it.

If UCase(Trim(CStr(oRset("Suburb"))))=UCase(Trim(CStr (Request.QueryString("link
")))) then .....

I am very perplexed. Thanks
John

Jul 19 '05 #2
Thanks Phillip - I switched to using INSERT and that worked - do you
know why that occurs with Recordsets?

"Phillip Windell" <@.> wrote in message news:<uD**************@TK2MSFTNGP11.phx.gbl>...
Don't use Recordsets to update data. You need to update or add data directly
to the tables using an SQL "Update" or "Insert" command (depending on which
you are doing).
--

Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
"John" <jo**@hokykoky.com> wrote in message
news:5a**************************@posting.google.c om...
When I enter data into my access db through the gui, my SQL Query
recognizes the data it is looking for and returns the result. ie I
enter "Dog" through the Access GUI and when my SQL query asks for
"Dog" it returns all the records with "Dog" in it.

The problem is if I enter "Dog" through my ASP web interface to
exactly the same database, I can see "Dog" in the table through the
gui, however when I run the SQL query, it only returns records with
"Dog" that were entered directly in through the Access GUI.

rs("BreakfastIncl") = BreakfastInclInput
rs("ConfCenter") = ConfCenterInput
rs("ConfCenterDescription") = ConfCentDescInput
rs("Distances") = DistancesInput
rs("File Name") = fileName
rs("File Size") = fileSize
rs("File Data").AppendChunk fileData
rs("Content Type") = contentType

rs("Subject")=nameInput
rs.Update

rs.Close
Set rs = Nothing

SQL Query = 'strSQL = "SELECT * FROM BIBS WHERE Suburb ='" &
Request.QueryString("link") & "' ORDER BY ID DESC"'
I am doing an rs.update - I can see the web entered "Dog" through the
gui - but the SQL query or the following line just does not see it.

If

UCase(Trim(CStr(oRset("Suburb"))))=UCase(Trim(CStr (Request.QueryString("link
"))))
then .....

I am very perplexed. Thanks
John

Jul 19 '05 #3
John wrote:
When I enter data into my access db through the gui, my SQL Query
recognizes the data it is looking for and returns the result. ie I
enter "Dog" through the Access GUI and when my SQL query asks for
"Dog" it returns all the records with "Dog" in it.

The problem is if I enter "Dog" through my ASP web interface to
exactly the same database, I can see "Dog" in the table through the
gui, however when I run the SQL query, it only returns records with
"Dog" that were entered directly in through the Access GUI.

rs("BreakfastIncl") = BreakfastInclInput
rs("ConfCenter") = ConfCenterInput
rs("ConfCenterDescription") = ConfCentDescInput
rs("Distances") = DistancesInput
rs("File Name") = fileName
rs("File Size") = fileSize
rs("File Data").AppendChunk fileData
rs("Content Type") = contentType

rs("Subject")=nameInput
rs.Update

rs.Close
Set rs = Nothing

SQL Query = 'strSQL = "SELECT * FROM BIBS WHERE Suburb ='" &
Request.QueryString("link") & "' ORDER BY ID DESC"'
I am doing an rs.update - I can see the web entered "Dog" through the
gui - but the SQL query or the following line just does not see it.

If
UCase(Trim(CStr(oRset("Suburb"))))=UCase(Trim(CStr (Request.QueryString("link
")))) then .....

I am very perplexed. Thanks
John


The Jet cursor engine uses a delayed-write technology to improve
performance. It caches updates to the recordset and executes the cache all
at once. While this does have the benefit of improving performance, it can
lead to the confusion you are experiencing.

As Philip suggested, my preferred methodology for doing data maintenance is
to use SQL DML (data modification language) calls: UPDATE, INSERT and
DELETE. Since the cursor engine is not involved, the modifications occur
when expected.

The delay-write period can be adjusted, and even eliminated, by using the
proper parameters in your connection string, but even still, I prefer to use
DML instead of cursor updates due to the improved performance of using set
operations instead of cursor operations.

HTH,
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"
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
17
by: DaveG | last post by:
Hi all I am planning on writing a stock and accounts program for the family business, I understand this is likely to take close to 2 years to accomplish. The stock is likely to run into over a...
5
by: B1ackwater | last post by:
We've fooled around with Access a bit, but only using the single-user store-bought version. It seems to be a good database - versatile and infinitely programmable - and can apparently be used as a...
34
by: Mathieu Trentesaux | last post by:
Hello I downloaded Office 2007 for this reason : It seems, once again, that it is impossible to save any modification done in a VBA library, from the main project in Access. The save button...
21
by: Bigpond News | last post by:
Work at a large site - 1000+ PC's. Mixture of Win98 & WinXP. Majority of applications using Access 97. If I compile the Acc97 application on a Win98 PC, the .mde will run perfectly on both...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
7
by: clintonG | last post by:
To all Microsoft partners and customers who have been unable to download recently or access ASP.NET documentation from the msdn2 website and for all of those customers who have been lied to and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.