Conn.Errors.Count Or Err.Number For Transactions?
What is the best way to control is a transaction? I've done a little test and both of the examples below seem to do the job, but I was wondering which is the better method, this:
If err.number <> 0 Then
conn.RollbackTrans
Else
conn.CommitTrans
End If
Or this:
If conn.Errors.Count <> 0 Then
conn.RollbackTrans
Else
conn.CommitTrans
End If
View Replies
ADVERTISEMENT
Is there a better way of handling errors than err.number, err.description and err.source. What i want is to be able to get the line, file etc that you get in the error message when you dont trap for errors so that i can email it back to myself whenever an error occurs.
View Replies
View Related
I really dont want the user to see an "Either BOF or
EOF" error message, or infact to know that there has been an error, instead
i want to redirect them to the homepage,.. which brings about my question,...
Is the Error number for either BOF or EOF errors always 800a0bcd???
my plan is to do a responce.redirect if it exists
View Replies
View Related
How can I count a number of characters in a variable.for example I have intTest = 19483, how to get 5?or strTest = "TestTest" how to get 8
View Replies
View Related
how to Count the number of characters in a variable?
View Replies
View Related
how can i count how many words have i written in a text area? Liek taking an example ... i am writing in this textarea of devshed forumns. and say in total i have written 50 words .. how can find out this information?
View Replies
View Related
I have created a form which asks the user a series of questions. I am able to retrieve the information from the database but I need to know how many rows of data has been entered for each question.
For example I have a question which asks the user what age range they belong to. I need to find out how many rows of data has been added into this column in the database. Code:
View Replies
View Related
I tried the following code to save in a variable, the quantity of entries in my recordset:
if rsEntries.Supports(adApproxPosition) = true then
strCount = rsEntries.RecordCount
end if
It didn't work for me. It's returning a value of -1 and I have close to 100 entries in my recordset. Is there an alternative to this? What code can I use to accomplish that?
View Replies
View Related
how do i count the number of values sent accross the form post seperated by commas ?
e..g 43352352,325324452,235234452,24523454
View Replies
View Related
how can i Count and display number of records in table?
View Replies
View Related
Has anyone successfully written an ASP page in JScript that implements transactions with a mySQL database?Please let me know - I'm having difficulty doing this.
View Replies
View Related
For eg:In a asp page i have 2 insert statements & 1 update statements.All these 3 statements I am executing on same asp page by creating a connection object.But I want to make sure that if first 2 insert statements execute successfully, then only 3rd update is executed.
It is possible that after the execution of first 2 insert statements database goes down and 3 rd update statement does not execute at all.In short I want to treat these 3 statements as a single transaction block and ensure that either all the 3 or none of the statements are executed.
How do I control it in asp page?By writing stored procedures in database & executing it as a single transaction block(using begin transaction & abort or commit) it is possible.But is there a way to conrol this using asp?
View Replies
View Related
Using the ASP 3 transaction functionality requires that the transaction flag is set as the very first code row, I understand. I now have a requirement to implement a transaction in one of the pages.
Unfortunately the whole site is based on SSI (server side includes) that are being picked up based on the users preferences. I have an index.asp page that does this selection, which is always loaded first. Is there any way around this, or do you guys have any
other suggestions?
View Replies
View Related
I'm implementing a version control system but i need some help
in setting it up.
I use access as the database.
My routines are setup to allow insert, update, delete on the same form.
View Replies
View Related
I have a ASP application with MS Access. I need to use transaction as there are server insert and delete statement.
oConn.beginTrans
Is it a correct way to use transaction? Would the server hang if there are around 10 (or less) concurrent users. Would the whole database being locked while a user is performing transactioin?
View Replies
View Related
i am developing something , on one of the pages i have a download link. when the user clicks on the link he gets a download box on his screen. i would like to code in such a way that after the download gets completed then his balance stored on the database should be decremented.
View Replies
View Related
I have a some code:
Rs.Open "[TableName]", Conn, 1,3,2
RS.AddNew
RS.Fields("Account_Name").Value = request.Form("Account_Name")
my question is does conn, 1,3,2 only write to the database not making the data readable? if i change it to conn, 0,1 i get page can't be displayed. I'm using access DB, with conn 1,3,2 it inserts fine, but when i go to query it i get no records found, but i see the data in the database, anybody have any ideas?
View Replies
View Related
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open application("dtat_motor_connectionstring")
set rs = new adodb.recordset
'Set RS = Conn.Execute(' "exec spcn_update_transactions &
customer_number, customer_name, customer_address, customer_city,
customer_state, customer_zip, customer_phone, vin,
acct_number, tag, title_number, tag_type_number, branch_number,
institution_number, yr_make, state_from, type_number)
response.write rs
%>
I'm I connecting them correctly. Is there and easier way to execute a stored procedure. I'm trying to insert data into a SQL page. I have to have the customer number returned to me asap for the next page.
View Replies
View Related
I use this code all the time, but what does the ",,129" mean? Are there other parameters that one might use (I only do fairly simple SQL commands).
conn.execute strSQL,,129
View Replies
View Related
I've got a webpage that calls some stored procedures with input variables.
The procedures return recordsets and also some output variables. We're
trying to get the values of the output variables. I've done this using the
method I found in MSDN, as shown in the code below. The problem is that we
believe doing it this way involves the use of the Microsoft Transaction
Server (IIS transaction server). Is this true? (The SQL Server and IIS
Server are on different machines and, I believe, a firewall separates them.)
I can't see why this method would use MTS. The problem is that in the past,
we have had problems with MTS stopping for no reason, which causes the
websites to not work. So my boss doesn't want to use any ASP code that
relies on MTS. Not using the stored procedure output variables makes things
way more complicated. So does this code really invoke MTS? And if it does,
is there a way to obtain SP output variables without using MTS?
I am running SQL Server 7.0 with the latest service pack and IIS version 4.
We do have an IIS version 5 server we can use if that matters. Code:
View Replies
View Related
I am working with MySQL database.
I am using ASP.I am using transaction safe table type InnoDb to create tables in MySQL.
I am accessing these tables from ASP using OLE DB provider for Mysql Version 3.0.When I issue a command like
conn.begintrans
I get the error "Provider does not support Transactions".
Pl. tell me how can I manage transactions for Mysql using the OLE DB provider.I thought of using MyODBC driver,but this driver always gives the recordcount as -1.
View Replies
View Related
Is there any way to modify the locktype when updating a database via a connection object's execute method? I have a game which worked completely fine when only ten or so people were playing, but as it grew into the hundreds, many people started getting errors and I'm 99% sure that they occur when the database tries to update when it's locked, which means that my connection execute statements are defaulting to pessimistic locking, which I don't want them to. Does anyone know how I can fix this?
View Replies
View Related
what is the best way to protect the connection strings keeping an effective, low overheaded access to them ?
View Replies
View Related
I have a problem utilising my connection string to open more than one recordset in one ASP page.
The following code runs absolutley fine on a server running ASP 3, but falls over when run on a server running ASP 2 (the error says:
Microsoft JET Database Engine error '80004005'
Could not use ''; file already in use.
The code I am trying to run is: Code:
View Replies
View Related
I searched the forum but I am still a little confused regarding the global.asa file. I created a global.asa file and it is in the root of the virdual directory. I then created a sub to initially connect to a datase such as: Code:
View Replies
View Related
I have 3 db connections, 2 of which are dsnless connections to access db's. Any of my previous existing pages that have recordsets from these db's work fine. I can add a new recordset to them and it works fine as well.
If I create a new page and add the same recordset in the same directory, I get the error msg saying something like "unable to open registry key" which from my understanding, means the page cant find the db.
Now I am using Dreamweaver 2004, and using their way to create connections where it creates a file, and then just adds an include statement an asp page if you use that connection.
Any good way to test this connection on the page or any ideas on how to troubleshoot where the path its pointing to is incorrect...im pretty much stuck at this point.
View Replies
View Related
Can any1 help me or suggest a helpful link for coding for Credit-card transaction.
View Replies
View Related
I'm trying to access an access database by including the DB's password within the connection string. I try to connect to the DB, but I get and "Incorrect Password" error. What am I doing wrong?
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"; uid=admin; pwd="pass"
conn.Open(Server.Mappath("maindb.mdb"))
set rsUpdateEntry = Server.CreateObject("ADODB.recordset")
View Replies
View Related
I am currently working on a small asp application. Now I would like to store the complete database connection in the application object. Note I want to store the connection NOT the connectionstring. For that purpose I wrote a small asp include which connects to the dbase and stores the connection object to the application object. However when I use this include in my pages then it doesnt work. What I am doing wrong? Here is the code:
View Replies
View Related
I recently installed IIS lockdown, and ever since my ASP pages have been hell. One problem is that now after a user views my ASP page which reads my local Access DB, the temporary file, .ldb, stays in the folder forever!
This temp file is created when a user opens the file, so I checked out the .ldb file and it says the ADMINISTRATOR is opening the file! How can the internet user be using the ADMIN account?! This is not good news! I will share my code for my page; however I have a feeling the code isn't the problem, but a setting is. Code:
View Replies
View Related
I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?
View Replies
View Related
Error info is as follows:
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Technical Information (for support personnel)
Error Type:
error '8002801c'
Error accessing the OLE registry.
/iisHelp/common/500-100.asp, line 154
Is ADO a separate install? And from where?
View Replies
View Related
I want to be able to log in a database any transactions my users perform. For example logging in, requesting a page, downloading a resource, logging out etc.
What is the most practical way to code this? I was thinking of trying to use an include file which would have a function to add a log in the database for each page on the site or when a particular action is performed.
View Replies
View Related