1 Transaction At A Time
I have a Bill table (tblBill) and there is a running bill number being stored for each transaction (1001,1002,1003...). This running number is not from mssql identities.Currently i am using "SELECT MAX (billnumber) FROM tblBill" and + 1 to get the following running number and store the next transaction.
This method works well if each transaction execute one at a time. Now i am having problem when there is more user executing the transaction concurrently. Sometime i will have 2 different transaction with the same bill number.How do i control so that a transaction will only execute at a time or using my method above is just rubbish? I am hopping this to be solve in ASP rather than in MSSQL.
View Replies
ADVERTISEMENT
I am trying to find out if Access is capable of utilizing the transaction function of ASP. I have seen differing points of view online and am looking for clarification
I have 2 inserts that run. If the second fails (for whatever the reason), the first should be rolled back.I have to use Access - is this the way to go or is there another option?
View Replies
View Related
I am using 2 stored procedure in my asp application. in my asp page i execute 2 stored .. their works depend on each other. i want to apply a transaction on these. must i apply it in stored procedure or in asp page.. any example or any link. can u help me about transactions.
View Replies
View Related
I'm trying to determine if I can use transactions in my ASP applciation against one of our Oracle 9i databases. My WROX manual says I can do this if the Transaction DDL property of my connection object is equal to 8. I've checked my connection properties with the following script and determined that my Transaction DDL property is 2
'============================================
Set conn = Server.CreateObject("ADODB.Connection"
conn.open Session("PROVIDER")
For Each Item In Conn.Propertie
response.write Item.Name & " = " & Item & "<br>
Nex
'============================================
But what is 2? MSDN (http://msdn.microsoft.com/library/d...oprg04_83jt.asp) says there are a number of possible vaues for Transaction DDL such as
DBPROPVAL_TC_NON
DBPROPVAL_TC_DM
DBPROPVAL_TC_DDL_COMMI
DBPROPVAL_TC_DDL_IGNOR
DBPROPVAL_TC_DDL_LOC
DBPROPVAL_TC_AL
But which one relates to value 2
View Replies
View Related
I have problem i need to carry out a transaction on a ASP page... the page goes like this:
<%
Conn.execute (Sql) ' Where the Sql Gets the Set_Number froom Table1
Conn1.execute(Sql1) ' here the Sql1 inserts the Value (Set_Number + 1 ) 'into the Table2.
%>
This page should be Executed as a transaction or else please help me out how to lock tables so that no other person can execute the same page with same data simultaniously...
I dont use any components in this page..so now how to go about with this...????
View Replies
View Related
In asp.net, there is an object sqltransaction we can use to garantee the
data will be written to database either completely or none will be written
into database.
I am not sure if there is a similar thing I can use in classical asp.
Can you provide some info
View Replies
View Related
I have an access database for a hotel room list which includes how many rooms I have available for each hotel. This list is updated via a form that updates the database, either adding or removing rooms. The database is on the server and is accessible by four employees, each of whom can update the hotel room number as they sell them.
The hotel rooms are in a table and this table is updated and records who updated it last by overwriting the previous update entry. I want to create a log file that records ALL updates each time the form is submitted, so I can track all transactions. I have not found any info on how this is done. Do I need to create a secondary table that only records when the form is submitted and database is updated?
View Replies
View Related
I have builded a web site that performs db queries and insert records, and I'm getting a overwhelmed amount of hits. Which was good but it created a big problem. I ran out of db connection licenses, because the way I did it, it opens/close a new db connection for every db action.
I read something about opening the db connection at the application level but most people think that's a bad idea.So I tried looking into MS Transaction Server but I don't know where to begin. I need to know how I could use it and how I could set the # of db connection allow.
View Replies
View Related
I looked everywhere, but I can't seem to find an example of a transaction in MySQL using asp. I need an example of the following:
1. Add a record to a table
2. retreive the last inserted id
3.add to a second table
these steps have to be in a transaction. so I would need to check for errors too.
View Replies
View Related
According to Access my ADO connection has a value of 16 for the Transaction DDL property. Does anyone know what this equates to? I've found this page -
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/adosql/adoprg04_83jt.asp
But it doesn't tell me which constant this relates too, and I haven't been able to find an answer at Google either.
View Replies
View Related
if it is possible to do recurring billing to Authorize.net using ASP Classic. I have no problem doing one time transactions.
View Replies
View Related
how can I apply transaction, commits and rollbacks to a lot of inserts in one script?
View Replies
View Related
I want to know,
. Operation Behind the Online Money Transaction.
. If Once The client paid the money,
. How is it validated..( Credit Card)
. Also how Can the Admin of the Site will get the Money from the User.
View Replies
View Related
I have a page that uploads an xml file and reads it into a SQL database. The
page is transactional and aborts if there are any anomalies in the xml.
My problem is that the if I repeat an identical import the transaction
succeeds the first time and then fails the next time. This pattern continues
with subsequent repeats. I have removed all of the ObjectContext.setAbort()
calls but still the onTransactionAbort() sub is called.
View Replies
View Related
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.
View Replies
View Related
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:
View Replies
View Related
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
View Replies
View Related
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:
View Replies
View Related
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 Related
How will we convert the system date & time to other timezone for eg: Eastern Time zone using ASP?
View Replies
View Related
When 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. ?
View Replies
View Related
Any some tools or sample codes drop down asp script execute time and
database connection time ?
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
i am trying to get a time variable which is 30 minutes before the current time to use in a calculation.
The code I am using is:
validationtime=time-3000
response.write(time)
response.write ("<BR>")
response.write(validationtime)
but the response I get is incorrect along the lines of:
11:54:42
14/10/1891 12:05:18
What am I doing wrong, why is validation time also including a date
View Replies
View Related
Can someone tell me how i can use a if loop
its related with time I want to display a registration form on 29 Jan 2007
only between 10am pacific time to 1pm pacific time
so only between 10am - 1pm pacific time the registration form should appear
i live in the central time zone
can someone tell me how i can make this happen.
View Replies
View Related
I am trying to use the time function to determine whether or not it is morning, afternoon or evening.
I wrote my code and then changed the values it is comparing with to see if would work and it doesn't, it just stays on the good morning.
<% if time > 0 then %>
Good Morning <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
<% if time > 12 then %>
Good Afternoon <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
<% if time > 18 then %>
Good Evening <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
Do i need to put quotes around the number i am checking with?
View Replies
View Related
how can i get this tag to adjust for time zones? This is probably simple, but i just can't think of how to do it. Code: <%=Time%>
View Replies
View Related
I am writing an XML file with lots of Data and it takes time but before the operation can be finished I get this error
Quote:
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
How do I handle this?
View Replies
View Related
Would anyone know if there is an easy and clean way of presenting maybe a time control field in html in an .asp page that allows a user to specify a certain time of the day? Currently using an <input name="SpecifyTime" type="Text"field but was wondering if there was a better way of doing this as to where users won't mistype in entering non time related characters?
View Replies
View Related
Would it be a stupid idea to use the Log Util component to retrieve the UTC date/time? It appears that the DateTime property could be used for this, but I'm not really sure how it searches through the log file.
View Replies
View Related
I've used this ASP funtion to display the time on my web page:
Date: <%= FormatDateTime(Date, 1)%>
Time: <%= FormatDateTime(now, 4)%>
THis was working fine until i moved my site to a server based in the states, not the time is 5hrs behind. help me resolve this?
View Replies
View Related