Updating Time
i want to update time... did i write this correctly?
last_login = "UPDATE user_info SET last_login = 'curdate()' where email = '" & email_address &"'"
i want to update time... did i write this correctly?
last_login = "UPDATE user_info SET last_login = 'curdate()' where email = '" & email_address &"'"
I'm trying to update time field which MSACCESS using query
Sql2 = "Update tblExtraNetUsers SET Lo_date = " & Date()
& ",Lo_time =#" & FormatDateTime(Time(),4) &"# ,Lo_count
= " & rs("Lo_count") + 1 & " WHERE UserLogOn = 'david'"
But its always gives a error message . Operation must use an updateable query.
I would like to display the difference between the logging time
[Session("start"] and the current time [now]. In hours minutes and seconds,
I have tried a couple of things but all I see is gobbledy gook.
I have a website that I subscribe to that allows me to track tasks. I have an extra computer with a big monitor that i want to always display the task list. the problem is after so many hours I get logged out.
I need to need to reload that sign in url every few hours Code:
there i was just windering how do i compare a date/time vlaue in sql server agaisnt the computers' date/time.
for example, if computer date/time is two months or 2 weeks before the database date/time do something
Currently working on a ASP for a friend, which requires the date and
time on it. It pulls in entries from an Access Database with dates and
times in the format of:
"Fri Oct 17 18:02:46 2003"
However my date and time on the ASP page is displayed as:
"Friday, October 17, 2003 18:02:46"
using the script:
"<%Session.LCID = 1033%>
<%=FormatDateTime(Date(), vbLongDate)%>
<%Session.LCID = 2057%>
<%=time()%>"
Anyone know how to change this script, fully or partly to produce the
date and time on the format that's in the access database i.e. "Fri Oct 17
18:02:46 2003" Code:
I am working on a database that collects information about incidents. One of the fields that people enter is the time of the incident. I am trying to convert that string that people enter into a OdbcType.Time and I am at a lost.
View Replies View RelatedHow will we convert the system date & time to other timezone for eg: Eastern Time zone using ASP?
View Replies View RelatedWhen the Form is submitted I use the Date() and Time() functions to put the date and time into the Body part of the e-mail. The time reported is three hours earlier than the time at which the Form is actually submitted.
I understand these functions are evaluated on the server so the server must be in a time zone three hours earlier than where I am . Is there any way I can get the local time at the location where the user is actually located. ?
Any some tools or sample codes drop down asp script execute time and
database connection time ?
I'm trying to do a very simple code that converts the server time into a time zone of your choice.
<%
dim h 'Current Hour
dim i ' Time Zone Increase - add or subtract hours
dim r 'Result Here
h = Hour(Now)
i = + 2
r = h + i
%>
but obvisouly i'm having trouble with the time zone convert.
I am trying to compare the NOW time with a "deadline" time. Please help. Just not sure why this is not working. I need to be able to say IF IT'S BEFORE 9:30 TODAY, IT'S OKAY TO ADD SOMETHING. IF IT'S AFTER 9:30 TODAY, YOU MUST ADD IT TOMORROW.
CODE:
nowtime=now()
deadlinetime=formatdatetime(now(),2) + " 8:30:00 AM"
response.write "NOW: " & nowtime & "<BR>"
response.write "Deadline: " & deadlinetime & "<BR>"
if nowtime<deadlinetime then response.write "can send out today" end if
if nowtime>deadlinetime then response.write "must send out tomorrow" end
if
RESULTS:
NOW: 1/18/2007 8:51:43 AM
Deadline: 1/18/2007 8:30:00 AM
can send out today
As you can see, NOW is GREATER THAN Deadline, so it should must send out tomorrow.
i want to calculate the total time between to dates and time.
Example: Total time elapsed from date 1 time 1 to date 2 time 2.
27/09/2004 11:00 - 28/09/2004 10:30
The user enters a record and then later comes back and closes it. I need to know the time it took from when they entered the record until the time it was closed.
Well, my script consists in check if the typed code doesn't exist in the DATABASE, but thats not the problem... the problem is that the PAGE1.ASP (that check the code) redirects to the ADD.ASP that will add those codes to the database!
Response.Redirect("add.asp?cod_1=" + cod_1 + "&cod_2=" + cod_2 + "&cod_3=" + cod_3 + "&cod_4=" + cod_4 + "&cod_5=" + cod_5 + "&sexo1=" + sexo1 + "&sexo2=" + sexo2 + "&sexo3=" + sexo3 + "&sexo4=" + sexo4 + "&sexo5=" + sexo5)
That's the line in page1.asp that redirects to the add.asp. So, when the database is completed empty and, the page1.asp checks that there ins't any problem with it and redirect to the add.asp that doesn't update my database!! So, it continues without any record. But, if the database has, at least, one record, the script works normally without any problem!
Another thing that I noticed is that when I, manually, type the adress Http://127.0.0.1/add.asp?cod_1=176096, for example, and the the database is empty, the script does the UPDATE and adds the code to the table!
I have no idea that the problem is. Does any one have a clue?
The goes the add.asp script: ....
I'm not sure if this is an ASP thing, a IIS thing, or a GoDaddy (where my domain is registerd and forwarded from) thing...
First I'll start by saying I run my own Windows XP web server and do all the coding myself..
I've noticed in the past (and never really gave it much thought, because the site works fine), that when I switch pages within my site, that the URL line is not always updated.
For example, I go into the pictures section, view a few pictures, then select the "Home" tab... The URL will stay with the variables that were passed when I was viewing the pictures. Therefore, if I do a "refresh", the page goes back to the pictures I was previously looking at, not the home page.
I've tried this on multiple computers at multiple sites, and with multiple browsers... And seems to happen rather consistantly...
Anyone have any thoughts?
I am looking at updating a notes part of my data base. I am calling two fields (first name and last) from the data base and putting them into read only text box (as i dont want the details changing). All of this is contained within a form. I am also calling a feild from the database called notes which originally has been inserted using a <textarea> tag. The problem i face is that you cant put values into a <textarea> (ie. i can put data from the database into the value tag of a textbox but <textarea> doesn't have a value tag). Due to this i am putting existing notes onto the page as text. Under this i have do have a <textarea> to put the new notes in.
The problem i have is that i some how need to store the existing data in the notes field and then add it to the new notes that i will be adding. I just don't know how to put the data i am getting from the notes field in the database into a variable.
Having problems writing an update script because in one of my fields I'm adding a chunk of HTML that contains ' characters. Obviously this throws up an error. How do I get around this?
View Replies View RelatedI'm trying to create and assign variables with the values from my db but can't work out the code getting my " & ' mixed up.
i = 1
do until i = 6 or rsSet.EOF
rBlock(i) = rsSet("rBlock'" & (i) & "'")
i= i + 1
rsSet.MoveNext
loop
whats better ADO or SQL
for example, an INSERT statement or an objrecordset.update blah blah?
same with .net
should I C# to update or SQL
I have an XML file which i'm trying to append elements to using an html form and ASP with javascript scripting inside the ASP file. Code:
View Replies View RelatedI have a function below that works fine. It takes a XML dox parses it, etc.
What I need to do is after the update of a record, I need to query the same table again for another record. If it finds this second record, I need to update it.
The problem is I can't get it to work, mostly because I don't completely understand the .open() method. Can I requery and the test for the existance of a returned record - if so how? Code:
I placed a post a couple of weeks ago discussing how I was having trouble using ASP and the XMLDOM to differentiate between the text content of Parent and Child Nodes in an XML file.
ie:
IF PARENT.text > "" Then
'Do Something with PARENT.text
ElseIf CHILD.text > "" Then
'Do something with the CHILD.text
End If
The problem being that I couldn't differentiate between the text values of PARENT and CHILD.
I've managed to work around that problem in a fashion but I'm begining to think that I'm going about this with the entirely wrong approach.
All I want to do is edit the following XML file through ASP: * Note that there are attributes with values and some nodes and child nodes have text values as well Code:
I am trying to configure Visual Interdev 6 (running windows xp professional) for debugging. However, while I run a utility viddbg.exe, the debugstatus file shows the following error message.
ASP.DLL Version Information
--------------------------------------------------------
Location: C:WINDOWSSystem32inetsrvasp.dll
FileVersion query failed
File Size: 339456 bytes
VID Debugging requires 4.02.0622 (330448 bytes) or greater. What is the best way to handle this problem.
I was give a site that was created on vb/asp and the owner want the site to b. be a asp.net web site, how difficult is for the site to be updated with the new .net technology?
View Replies View RelatedI get this error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Expected query name after EXECUTE.
I tried hard but nothing, I have a same example working, but when I changed just the field names...it didn't work!! Code:
i'm trying to add the data of such client, some of his data have been added already but if i'm going to add or update his data (additional info.) what happened is the data is being added into new row not on the specific client. Code:
View Replies View RelatedGot a cookie problem, specifically with persisting it when I write to it a
second time on another ASP page. Here's the scenario:
Page1.asp:
- I have a cookie with serveral keys
- I set all the key values
- I then set the overall cookie expiration (you don't do this for all
the keys right, just at the top level?)
- This works fine, the cookie persists, but if I then go to page2.asp...
Page2.asp
- I simply use the response.cookie("cookiename")("KeyName") to update
some of the prior values.
Once page2.asp gets called, the cookie becomes a session cookie and does not
persist.
Questions:
1. I wasn't then re-setting the expiration, do I need to? I tried but still
the cookie wouldn't persist.
2. What is the correct order of setting the expiration, before, after
setting all the key values? Does it matter?
3. Can you in-fact update a cookie's key values, or is this fundamentally
incorrect, do you need to re-write the whole cookie?
4. Any other ideas?
I want to let the user of my asp-page fill in a form, and with this data I want to update an existing XML-file The xml-file: Code:
View Replies View RelatedI have a script on my asp page which takes values entered from a form and inputs it into a database, in their appropriate fields. It's been working fine, but lately I'm noticing that I've been getting some blank records being entered in my DB table.
I know it's not my form becuase there is no way to leave it entirely blank, so even if you don't enter anything... their are hidden fields which already contains a value that get's passed and goes into the DB.
I am wondering if this is a result of many people entering data into the access db at the same time, and i'm wondering if i have the right locktype parameter.
I am using adLockPessimistic right now... should that be adLockOptimistic or adLockBatchOptimistic????
and should the cursor type be adOpenDynamic???
I have a stock control database, I want
first the item sold and recorded as sold in the sale table
secondly the item will be deleted from the stock table
third the item wil be automatically reordered in the order table.
is this possible please. I am using Dreamweaver/access and some of ASP that is generated,
I have a bit of ASP that gets data from the database and then displays it. This part works fine.
I then have anouther page to allow for changing this information, then i want to do two things, first show the updated info, and then update it in the database.
Neither of my updates will work and i can't figure out why.
I get this error: ADODB.Recordset error '800a0cb3'
Object or provider is not capable of performing requested operation.
I have checked the record it displays the info just fine, it will not update however. Here is my code for updating the record: Code:
Here is a code for ASP inputs being updated in Excel. However, when I
click to submit the user, the excel does not get updated! Code:
I have the following code on my site that Updates certain fields in the table. When I check the Tables they are all updated perfectly but I keep on getting the following error:
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
This is the code involved:
if strAction = "submitted" then
'lngCount = Request.Form("lngCount")
i = 0
do until i = Request.Form("lngCount")
UpdateSQL = "Update Site_Info SET Site_Accepted = " & Request.Form("acceptance"&i) & ", Site_Date_Accepted = #" & Now() & "# where Site_Seq = " & Request.Form("lngSeq"&i)
oConn.Execute(UpdateSQL)
i = i+1
loop
end if