Error-checking And Query-results After Execute
After commands like:
tmpDBconn.Execute("DELETE * FROM mytable WHERE rc_id = 10" )
How do I check for errors?
Is there a way to check the results?
OR:
Set rsCatCount = tmpDBconn.Execute("SELECT COUNT(*) FROM cat WHERE key_id = 10 AND cat_id = 6")
How do I get the count? Do I use rsCatCount(0)?
View Replies
ADVERTISEMENT
DBMS: MS Access 2000
ADO Version: 2.8
IIS Version: 5.1
I'm trying to use the ADO's Command object, Execute method to execute a SQL Update Statement. I would like to ask how do I check for the no of rows affected by the SQL Update command.
View Replies
View Related
How can I check if the result of a sql-query matches a certain value? With the code you will understand what I mean. Here it is. Code:
View Replies
View Related
Using ASP, I would like to write down to the HTML the time taken to execute a query. I am trying to optimize my SQL queries in the ASP page. So I want to determine if my SQL query is optimal or not. So how can I determine how much time it took to execute the query and return the results.
For example, something like: It took 5 seconds.
View Replies
View Related
I tried to run 2 queries in single connection. But it doesnt work to the second query
page will return an error but execute the frist query only. How can i solve this problem.
I'm using Microsoft Access 2000. Here are the code an error that return
Dim objConn, strSQL1, strSQL2
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=egbit_dev;"
strSQL1 = "Update ADM_USERTAB Set USER_PWD = '" & new_pwd & "' where USER_ID = '" & userid & "'"
set rsUpdate_Pwd = objConn.Execute(strSQL1)
strSQL2 = "Update EGBIT_PWD_STATUS Set password_status = 'change' Where user_id = '" & userid & "'"
set rsstatus = objConn.Execute(strSQL2)
error :
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
( it refering to line that execute set rsstatus = objConn.Execute(strSQL2) )
View Replies
View Related
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 can you use ASP code to execute an Access query. I want to run the query to then display updated data on the webpage.
View Replies
View Related
I'm stuck on trying to display a single row from a query I'm executing.. it was fairly easy in PHP and I'm sure it is in ASP too, I'm just not sure what to code.. I couldn't find anything on the web that was simple.
If anybody has some suggestions on how to display just the one row that is returned from the query that would be great for now. I'm looking to eventually add 'LIKE' to the query to allow for similar names/passwords to be displayed.. but for now this should do. Here's the code:
View Replies
View Related
I want to write all the query results onto a file so that it is all ready to give to the client.
I am currently writing a query to pull out certain orders in a day and i want to write these results directly to a text file.Also this text file will be obviously placed on the server..is there any way of creating this file on the computer you are accessing this web page on?
View Replies
View Related
I need to create asp page witch has a form at top of the page. This is the search form. Then I need to present the search results from database query on the bottom of the page as a table. That table has about dozen columns. Some column values can be modified and saved to the database and some column values has to be modified and saved from another page.
Search table is no problem but I have problems getting the results table to work right... Query results are in recordset.
I need some advice on how to do the results table on the best way!
So far I am thinking on creating a form on every row of results and posting the changes of values to save.asp page where I would save the modifications to database.
For the values witch have to be modified on another page I would add a link something like this... Code:
View Replies
View Related
How can I get this line to work? I am trying to get the results entered in a form to be part of my query. I am able to get the form results but I get a error stating Syntax error (missing operator) in query expression 'Assignee = Tom Jones'.Below is the line where the error occurs
Session("dbWhere") = "Assignee = " & Request.Form("assignsearch")
View Replies
View Related
I'm trying to get results from a number of areas via one command string.for example ?location=devon retrieves everything in devon but I've only got a link for the whole south west so I need to send ?location=devon or cornwall or dorset etc. altogether.Is there a way I can do this without changing the asp page or do I have to only search one field at a time.
View Replies
View Related
I am working on a classic ASP application. This application needs to run an SQL query and take the result set and stream it into an XCEL spreadsheet for processsing by the users. Is there an ASP method of third party product to do this?
View Replies
View Related
I am trying to design a page that displays data from a query in groups of a field in the where clause and then displays a 'total' per each group. Code:
View Replies
View Related
Has anyone experience with rendering CrossTab Query results with ASP?
For example, using this SQL:
TRANSFORM Count(threads.threadid) AS CountOfthreadid
SELECT threads.threadSeverity, Count(threads.threadid) AS [Total Of threadid]
FROM threads
GROUP BY threads.threadSeverity
PIVOT threads.threadStatus;
This returns the following in Access:
[threads_Crosstab] [threadSeverity] [Total Of threadid] [Analyzing] [Closed] [Coding] [Open] [Re-Testing]
[Medium ] [1] [1]
[Not Set] [160] [1] [122] [1] [35] [1]
I want to create a HTML table to display the results in my webpage. However, I don't belive the output from a "Transform" is a true recordset. When I request the names of the fields in the recordset, I am getting data from the "rows".
Is there standard way to display these types of queries? How does one access the data in a crosstab query? Are there ojbect classes to handle this?
View Replies
View Related
I'm attempting to limit a query which is being ordered by a date field to 10 records. The date field contains duplicate values, which are sorted from most recent, back.
However their suggestion of sorting by a secondary field is not providing acceptable results (it returns all the rows in the database). Does anyone have any suggestions of another way around this?
View Replies
View Related
I have an asp page that needs to display the string that is returned from a
cgi file.
As an example, if you enter http://mydomain.com/mycgi.cgi?98127398 in to a
browser, it will display YES or NO
I need to have my asp code query this url, get the resulting string, then
act upon it (basically use the answer to display a nice big tick or a big
cross). Code:
View Replies
View Related
here's what i want to do. from an asp page, perform a search on a
table in access. i have used sql code in the asp page itself, but i'd
rather execute a query in access. i have success in running any query
(basic SELECT, SELECT with conditions _other_ than LIKE, etc..) for
some reason, when i execute the query below from the asp page, i get
no results.
the search.asp page just has a text box in a form that submits the
srchBOX field to the results.asp page.
here's the asp code from the results.asp page: Code:
View Replies
View Related
I am trying to search through an access database for tickets createded with in a certin date. I am using the below code.
strdate = DateAdd("d", -2, Now())
sqlstr="SELECT * FROM Incidents WHERE TicketDate BETWEEN #"& Now() &"# AND #"& strdate &"# ;"
I verify the query with response.write and get the following.
SELECT * FROM Incidents WHERE TicketDate BETWEEN #15/07/04 19:19:32# AND #13/07/04 19:19:32# ;
I know there are 100% tickets within this date. Yet my query returns nuthing. Please help i've searched this forum for other peoples code looking for examples but end up with the same result.
View Replies
View Related
I am writing a script that lets me brows the contents of a web server. The problem is the account that is running ASP does not have permissions to every folder. Don't ask me why ... I have no idea but it can't be changed.
What I would like to do is perform a check for:
Microsoft VBScript runtime error '800a0046':Permission denied
And if this happens display an error message saying they do not have permission to view this directory. Code:
View Replies
View Related
How to re-write this so it can error check for each individual field. Username, email, password etc.
This is written and validates if the user already has an account in the Database. then it returns the messaage below. But I would like to indentify if it is the username that exist or the email or password. Code:
View Replies
View Related
why this string fails to check if a user does not enter any data in a field?
<%
' Declaring variables
Dim make, model, description, price, data_source, con, sql_insert
' A Function to check if a field is empty
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
' Receiving values from form
make = ChkString(Request.Form("Make"))
model = ChkString(Request.Form("Model")) and so on and so forth...
%>
View Replies
View Related
what would be the best way to error check a page after I clicked submit but before I go on. Example:
I have a page that dynamically puts text boxes & lists on a page depending upon which button I click on the main menu. What I want to do is check the text boxes for correct values (most likely before I go to the next page which is the Update page). But since I am dynamically creating the page & text boxes I don't know what the names are... I am doing the dynamic page through server side script.
This means that almost all my variables names and anything associated with the dynamic page are in the Server Side script and can't be reached by Client Side script. ok long story short which is best to error check a dynamic page before updating the info on that page. Server Side | Client Side script?
View Replies
View Related
I'm setting up a simple competition entry system in ASP where users can enter their name and email address to be added into a prize draw. It's pretty simple stuff, with the data being added into an Access DB table.I've created an index on the 'email' field to stop the same person entering more than once (unless they have more than one address, but let's pretend that's never the case ).Instead of doing a SELECT query to find whether they've entered before, I simply want to attempt to INSERT the data into the table, and if it returns an error along the lines of "no duplicate values in the index" it would give the user an error.My question is, is it possible to display a user-friendly version of the standard ugly ASP generated error message when this error is detected? Or am I stuck with the incredibly unattractive error message we're used to?
View Replies
View Related
i'm making a forum, and previously i was submitting the form to an asp file, which would check for errors -- if there were errors, it would redirect back to the form with error messages to be displayed -- if it was error free, the message would be written to a txt file.
but then i wanted to put in a preview message page, and so error checking and passing values between the three pages is becoming tricky. so i'm at the point where i'm starting to use javascript to error-check, which works fine for making sure the input is good, but i don't know a good way to notify the user that there are errors with javascript. alert messages are unprofessional, and i can't just add text to the page using javascript.
i'd prefer to use only asp, and i'd prefer it if i didn't have to use an extra asp page JUST to error-check. as it is now i have these pages involved in adding a new subject:
post subject (has the form for the subject and message; the user can click either post message, which will directly write the message, or preview message, which will bring them to a page which displays the post as it would appear once written)
preview message (regardless of what the user clicks, it would come here first to do error checking, and depending on what the user clicked it would either redirect to the page which writes the subject, or display the message;
the problem is, if there are errors with the form, i need to point the user back to post subject without losing whatever info they have already entered. the only way i know how to do that is by submitting a form [i can't use a querystring because it won't maintain the message if the user entered multiple lines in the message])
add subject (this does the backend writing of the message, and is only accessed if the fields have made it through the error-checking)
any solutions in mind on how to pass the field values between these three pages?? or is there a better way i can do error checking??
View Replies
View Related
In Kevin Yank's book, he shows how to put in error checking at various stages of working with a database: connecting, querying, etc. I presume the same general principles apply to ASP/SQLServer but I don't know the code. Can someone tell me at what stages I should be checking for errors and some generic code that I could use at each stage?
View Replies
View Related
how to create a form that would handle basic error checking within the ASP itself?
View Replies
View Related
Whenever i try to accecc HTML page through server.execute, i got this error.
Server object error 'ASP 0228 : 80004005'
Server.Execute Error
server.execute("/folder1/htmls/" & strfilename & "_1.html")
The call to Server.Execute failed while loading the page.
View Replies
View Related
I'm getting this useful error '80040e14' when trying to run a select statement in an ASP page. The connection to SQL Server 2000 is ok. The variables in the Select statement, 'area' or 'areaid' are passed through form the previous page ok.The code is below... Any ideas? Is it something obviously dense on my part?? Code:
View Replies
View Related
I am currently running IIS 5.1, Windows XP Pro with service pack 2. When I try to run an ASP page I get an error saying that 403.1 Execut Access Forbidden - IIS. There are no firewalls up and running. I hav given permission and access to everything, every folder that I can thin to give access to. Obviously I must be missing somethin somewhere. anyone have any ideas for me??? The execute permission have been set to scripts only. I have also tried scripts an executables.
I also have a box that I run the same asp pages on and the onl difference that I can find is that I am running Windows XP Pro wit service pack 1. I don't have any problems executing ASP on this box. I have tried to mirror all the setting from box to box and stil nothing.
View Replies
View Related
The following code has run-time error on "divide by 0" error. I expect
"do the work<br>" will not print in the browser, since it happen after
the code that cause the error. However, this is the output: any ideas why?? Or
this is the nature of ASP scripting language that is being executed in
sequential order? Code:
View Replies
View Related
We are using Microsoft's treeview.htc control to display a tree control in
our .NET application.
When displaying the tree, the browser returns the error:
Dynamic Link Library (DLL) initialization routine failed
pointing to the following line in treeview.htc:
if(oItem.filters.length>0)
in function blurFilter().
Does anyone have any ideas about this and how to resolve the error?
View Replies
View Related
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/changeprofile.asp, line 44
Code:
View Replies
View Related