SQL Update Query Not Working Correctly

I am currently working on a small website which gives an up to date current count on how many people are available are certain time slots for different areas, this is run of a Microsoft Access Database Backend.

My index script will display all areas and times and then display a link to a form which deducts 1 from the current count. Code:

View Replies


ADVERTISEMENT

Session.Timeout Not Working Correctly?

I have web forms that frequently expire because users have them up for more than the default 20-minutes without interacting with them. So, I changed the timeout in IIS to 7200 seconds (2 hours, of course) and added a Session.Timeout = 120 to the pages in question. (Am I right that Session.Timeout is in minutes?)

Still, however, the pages seem to be timing-out well in advance of the 2-hour threshold. Have I left something out?

I've skirted around the issue by putting the forms into a framepage and setting a blank frame to refresh every 10 minutes, but I'm not fond of that solution. Plus, I'm just curious why the Session.Timeout setting or IIS timeout setting does not seem to work as advertising (allowing for the fact that I may just be a moron and missed a step).

View Replies View Related

Insert Query Not Working

I am having a problem getting an insert query to work. Here is the code:

sql="Insert into tblInCart(user, item_number, qty, price, description, taxcode) Values('" & user & "', '" & item & "', " & qty & ", " & prc & ", '" & desc & "', '" & tax & "')"
set rs2 = db2.execute(sql)

This was the error statement:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
It points to the "set rs2=db2.execute(sql)" line

The sql statement looks like this: Insert into tblInCart(user, item_number, qty, price, description, taxcode) Values('EXMPLE', '100BLUERASP', 1, 3.99, 'MIX COCKTAIL BLUE RASP', 'N')

The user, item_number, description, and taxcode fields are text, the qty field is integer, and the price field is currency. The rs2 recordset was previously used for a select query, which works fine, but it is closed before this happens.

View Replies View Related

ASP LDAP Query Working On Localhost But Not Webserver

I am using classic asp and making a
connection to LDAP server using SQL code under IIS 5 on my localhost
and it works great. I have a form and form fields that pull from
active directory. Now, once I get the web team to deploy these files
to the webserver where all users will be able to run this app.(this
server is using IIS 6), my form fields show up blank. For the life of
me I cannot see what is wrong or different except the IIS version.
Also, I have gotten the IIS logs and they don't tell me anything.

View Replies View Related

Using Update Query

I am doing a bmw tracking project for school using asp and access2000.
on my search.asp page, I can search for a particular bmw and order it if
i want. It works fine when i do select query to get data. But when I try
to order a bmw(using update query), it gives me this message error:
Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/bmw/search.asp, line 257

I have gone in to set IIS permission status to both read/write and
change everything that seemed obvious. but i still get this same error
message.

View Replies View Related

SQL Update Query On DB

what changes do i have to make this query work in an SQL query? This is the access query:

UPDATE tblLocation SET tblLocation.fldLocationDesc = "DU" & Right([tblLocation]![fldLocationDesc],Len([tblLocation]![fldLocationDesc])-2)
WHERE (((tblLocation.fldLocationDesc) Like "EI*"));

what i have is a location that has a lenght of 5 like EI001 and I want to change the EI to DU.

View Replies View Related

Update Query

How do I update a record if I want to loop through the records then update the current record in the loop. Flow :

rs.EXECUTE("Select * from Tbl Order By Ord;")

'update current recors in loop record

rs.movenext
loop .

View Replies View Related

Error On Update Query

I need help on this error that occured on one of the pages. fuunny thing that its happen in localhost and not in the web server. below is the code and the highlight of where error occured.The error mentioned in the page is :

Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.

/shop/confirmation21.asp, line 245 . can anyone kind enuff to let me know whats it about?

Code:

View Replies View Related

Execute Update Query

wat are the different ways i could execute this update query. Code:

sql="Update Employee Set name='"& name&"', age="& age &" location='"& loc &"'
Conn.Execute sql

the sql statement shows evrythings correct. but when i execute the update query...it shows syntax error in UPDATE statment.

View Replies View Related

How To Create Or Update A ACCESS Query From Asp

I'm using odbc and Classic ASP and I want to read the sql content of a query in an access database. ANyone have any clues?

View Replies View Related

Update Query Works In Access, Not In ASP

I have the following query:

Update properties set Last_Change=#8-Mar-2006# Where properties.fdref='h3c000';

which works fine when I run it on my desktop under MS Access, but when I run it as an ASP page, I get the following error message:

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

I am using the same database bot online and offline so field names etc are exactly the same.

View Replies View Related

E-commerce - Checkbox - Pricing Update - Query

I want to change the existing code of our company e-commerce site so that the pull down menues are now checkboxes (will make life easier for sales to work with).

The pull down menu's must automatically submit, as the pricing changes with each selection.

Is there a way of auto submiting when a checkbox is ticked / unticked? Have tried using the "onChange=" that I nicked from the pull down... Code:

View Replies View Related

Update/Query Problem - ASP Reads In All Integers As 0

I have developed this script that is meant to take in a value from a database record add one to it and post the new number in the record. It works ok but it always seems to read all database records as 0 never as thier true number (i have tried it set to 1,2,3 etc)

Code:

View Replies View Related

Running Update Query ODBC Drivers Error

I am getting this error when trying to run an Update query, Microsoft OLE DB Provider for ODBC Drivers error '80040e14' Can anyone explain to me what this means and where I'm going wrong.

View Replies View Related

Printing Correctly To A4

I have been asked to produce a web form that can be completed with various customer and product details, populated where necessary/possible from a database. This form then needs to be printed as an A4 document.

I have never dealt with printing from ASP before, but I know that simply trying to print a page to an A4 document causes you to end up with numerous bits of paper, most with almost nothing on.

I also need to ensure that the URL and other details that are apparent if you directly print from a browser are not there.

View Replies View Related

Using Cookies Correctly

How do I save cookies onto a computer propperly? I know how to save them, but whenever I try and do it, the browser just blocks them. So how can I save cookies onto a PC without getting them blocked?

View Replies View Related

Passing Value Of A Record Correctly?

this is driving me crazy and this forum is my usual last resort when i cant get something working! im trying to add some data to a table (access db). but first i need to find the primary key id of the fields im about to enter. im dealing with dates here, hence the bits of code concerning dates. so far i have: Code:

View Replies View Related

ASP Pages Not Being Served Correctly

I have a new computer that I have iis 5 installed on win xp. I am trying to
run a simple one line asp test file in my wwwroot directory.

In IE 6 it says: HTTP 500 - Internal server error
Internet Explorer

In Netscape 6 it says "Class does not exist."

In my application event viewer, there are no entries from "Active Server
Pages", like I"m used to seeing in my other computers. Usually this entry
says "Service Started" or "Service Stopped". So apparently the asp service
is not running. I thought that uninstalling and reinstalling IIS would fix
it, but not luck.

View Replies View Related

Needs A Way To Make Sure Data Is Correctly Added

How can I make sure that it adds all of the records to the table before I make Added = "True" It is strange, but sometimes, it won't add a record at all and then proceed to Added="True" How can I make sure that rs.Update was successful? Code:

View Replies View Related

Cannot Get To Format The Date Field Correctly

I cannot get the date format correctly in dynamic sql statement, after trying various ways of handling it. I need some help with the date format in the following dynamic sql statement. Any help is appreciated in advance. While running the asp page, I still get an error as Error Type:

Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'Format'

DYNAMIC SQL STATEMENT:

sql = " INSERT INTO tblExpense (ENO, EntryDate, ContractedServiceExpense, "
sql = sql & "TravelExpense, PersonnelExpense)"
sql = sql & " VALUES('" & l_ENO & "', " & Format(l_Date,
"#mm/dd/yyyy#") & ", " & l_contractedserviceexpense & ", "
&l_travelexpense & ", " &l_personnelexpense & ")"

View Replies View Related

Boolean Expression Not Being Eval'd Correctly?

I have some code that checks security permissions in a DB, and before my conditional statement that checks these permissions, I am writing out both values to see what the statement looks likebefore it is evaluated.

The problem is, it seems to disregard the condition and always returns True, even if the condition should be false...any ideas? I also did some testing to assure that the length of the two values I am comparing is 1, just in case they were possibly holding spaces, and I verified they are numeric as well. I am just stumped here...

Let me also preface this code snippet by saying, I am using this asp script to generate javascript menu choices...and I did include some commented debug statements so I can see what the javascript rendered.. Code:

View Replies View Related

Special Characters Appearing Correctly In Email

I have a form that is being sent using CDONTS. The problem is the form I'm sending has a lot of special characters (it's in Spanish) and while I know how to get the chars to display correctly on the page, they're not showing up correctly in the email.

They either show up like this:
Country : Canad�;

or if I encode them, like this:
Country : Canadá

How can I get the email to display the correct character
Country : Canadá

I'm fairly new to ASP (I'm a PHP programmer) and have no clue how to do it.

I've noticed that the email is not set to encode in any special way like the equivalent for PHP......

View Replies View Related

Aspx Programs Not Parsed Correctly In Netscape

I noticed that when I process my aspx web pages in Netscape that the page is not interpreted correctly. Text boxes that are supposed to have no border, have borders, the font for arial is one size larger than what it is supposed to be, etc. Doe
Netscape plan to fully support the Net Framework system

View Replies View Related

How To Tie RegID To Form To Update (batch Update)

Okay there is an unique EventRegID for every registration. When people first register they get pre-registered. Then an admin comes in and confirms or wait list them (based on whatever requirements). My question is how can I tie the EventRegID to a form with multipule ID's so they can batch confirm or wait list the PreReg list? Code:

View Replies View Related

Need To Convert This Sql Query For Access To Identical Sql Query For Sql 2005..

My code retrieves a username and a password from a form. Then this information is compared to some usernames and passwords that are stored in a database. The important thing here is that the comparison must be case sensitive meaning that "passWord" is not the same thing as "password"

I have this code, working fine in access 2003

SQL = "SELECT * FROM users WHERE StrComp(username_column,'" & entered_username_in_form & "',0) = 0 AND StrComp(password_column,'" & entered_password_in_form & "',0) = 0"

but get the following error when I run it against my sql 2005 database.

[Microsoft][SQL Native Client][SQL Server]'StrComp' is not a recognized built-in function name.

I don't know the corresponding t-sql for the query.

View Replies View Related

Query A DB - Pass The Query To Next Page

I am running a querry on an access database and have set the number of records/page displayed at 20. if there are more than 20 records returned, then 1st page will show the first 20, the next page will show next 20 and so on....

The trouble:

the count of total records displayed is correct and the first page is displayed correctly. But when i click on *Next* to go to the next page, all the records of the database get displayed (not the 2nd page of records from the query).

View Replies View Related

Query Access With Multiple Query

I am using ASP/MS ACCESS to see how I can query the same database, via 2 formfields.

{name: - search}Textfield 1: - Search by Category
AND/OR By
{name: - searchT}Textfield 2: - Location

Currently,

strSearchwords = Trim(Request.QueryString("search")); where "search" is the name of Textfield1

Which is fine, but how can I set it so that on Submit, the string from search, and searchT are somehow joined together into one string?

View Replies View Related

ASP LIKE Query Using Parameterized Query

In Access you use "*" + [passed variable] + "*", + can be replaced with &
Calling a parameterized query in Access requires % be used in place of *,
however, all that I have read show dynamic SQL passed to Access:

WHERE [some column] LIKE '" & ASPvar & "' % ORDER BY ...

However, my call is similar to:

conn.qMyLookup strVar, rs

If I modify the query in Access to:

"%" & [passed variable] & "%"

I get all records. If I only put it at the end, as suggested, I only get
matches at the end, not throughout the column. Code:

View Replies View Related

ASP Not Working Ok In PWS

I just installed PWS on 2 machines (XP & 98).

The problem is that I can run the ASP files in the wwwroot folder when I use http://localhost from my browser or RUN (and that's for the default.asp). But the asp files do not work when I call them from a hyperlink in an HTML file.

View Replies View Related

CDO Is Not Working

After I moved the site to new server the mailing method stoped working , the cdo pull the email from sql database on the same server .. although it says sent to # recipients.
I send a webpage (newsletter) exisit on the server "I use full url" also the registration page gives when registration the error: CDO.Message.1 error '80040218'

Unknown Error

/extra/news/reg3.asp, line 251

line 251 is objSendMail.CreateMHTMLBody "http://www.example.com/newsletter.html"
I saw description of the error it sayes that I have to use full url ...but I am using it ...
any Idea ...

View Replies View Related

Asp Working Or Not

I have a sever 2003 machine of which I am trying to host a webisite on. The webpages I uploaded has lots of .asp files that could not be open. I'd contact the website disgner and complains about it and an he blaims it on my server not supporting asp technology.
My question today, is there a way to test what the problem really is?

View Replies View Related

FSO Not Working

In my serverside script I have gone down to the bare bones and the following doesn't seem to work:

dim fs
dim fst
dim LineOut
set fs = Server.CreateObject"Scripting.FileSystemObject")
set fst = fs.CreateTextFile("C:TEMPhome.tmp",True)

lineout = "MAFFIdentifier" & vbtab & "Title" & vbtab & "Initials"
fst.writeline(lineout)
lineout = " ==================================================
========"
fst.writeline(LineOut)

fst.close
set fs = nothing

The server gets to the end since I place a response.write in to test.

If I cut and past this into VB declare the variables as objects and lineout as string and remove the "Server." from the line when setting fs, then it works fine in VB.

View Replies View Related

Not Working In PWS

The problem is that I can run the ASP files in the wwwroot folder when I use http://localhost from my browser or RUN (and that's for the default.asp). But the asp files do not work when I call them from a hyperlink in an HTML file.If I do that, all I see are the contents of the asp file.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved