How Do I Delete Records From My ASP Page?

At the load of an ASP page I would like to delete all records in my MDB that have the value of 'gmp@gmail.com' in the 'email' field. How would I do this using VB? Here is the code I have: Code:

View Replies


ADVERTISEMENT

Delete Records

i put a message box and asked the user if they are sure they wana deletethe record. if no,it will cancel the work.

if yes, it will delete the last record no matter which record you choose. i see where the problem is because the code come in a loop and so the last value of that loop will be the last one. i need to know if there is a way to solve this so that it will take the value of the chosen record?

View Replies View Related

Add Records Before Delete

This code works great--but only the first time. Once the HoldingTable1 is created, I can't get the SQL to append records. Anybody have any ideas how to tweak this into an INSERT INTO statement that works?

strSQL = "select * into HoldingTable1 from " & strTableName & " where " & AddWrappers(strKeyField) & "=" & gstrQuote & Replace(request.form("mdelete1")(ind), "'", "''") & gstrQuote
dbConnection.Execute strSQL

dbConnection.Execute strSQL
strSQL="Delete from " & strTableName & _
" where " & AddWrappers(strKeyField) & "=" & gstrQuote & Replace(request.form("mdelete1")(ind), "'", "''") & gstrQuote

View Replies View Related

Delete Records

I created a form that will update or delete a record using ASP and FrontPage 2002. This worked fine until I loaded the .Net framework 1.1 on my Win 2K server. Now when a user tries to delete a record or perform an update of a record the following error is given.

Your page contains a query with user input parameters that could not be resolved. This could happen if your DatabaseRegionStart webbot has an empty or missing s-columnnames or s-columntypes attributes. You may need to read Microsoft Knowledge Base Article 817029. This article only refers to how to fix the problem in FrontPage 2003. What do we do to fix the error for those of us who have not updated to FP 2003?

View Replies View Related

Delete Multiple Records

I read this article below and play around with delete multiple records function in dreamweaver. Assume that all my database fields setup are exactly like the code below. I was able to follow the instruction and did everything excepted line# 29. Can someone give me a suggestion of the line# 29 suppose to be (in example if possible).....

View Replies View Related

Delete Records Using A Date Field

I've got a table with three fields:

ref (Autonumber)
notice (memo)
expdt (Date)

I'm trying to use an SQL statement to delete all records where expdt < the current date (Now). Here is the code I'm using:

<%
If Request.Querystring("act") = "clean" Then

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open ConnStr

strExpdt = cdate(Now())

sql = "DELETE FROM tblNboard WHERE expdt < " & Now()

conn.Execute sql

conn.close
set conn = nothing

strResponse = "All expired notices have successfully been deleted."

End If
%>

However, this just gives me the following error:

Syntax error (missing operator) in query expression 'expdt < 11/12/2003 19:54:25'.

What am I doing wrong??

View Replies View Related

Delete ALL Records Before Current Date

how can you delete every single record in a table from the access DB with a DATE column, which stores the date in format DD/MM/YYYY? Code:

View Replies View Related

How To Delete Multiple Records Using A Series Of Checkboxes

Does anyone know how i could print multiple records in a database using a series of check boxes on a webpage? i.e it prints all the records that have been ticked?

View Replies View Related

SQL DELETE Statement In ASP Page

I have a hudge problem with a DELETE sql statement in my asp page. The delete statement is supposed to delete the user which I have selected to delete. Here is the info on the database tables etc. Code:

View Replies View Related

Delete A Page From The History

How do you delete a page from the browser history when a user has logged out, it worries me that when a user of mine signs out all you have to do is hit back on the browser and you can see what the user was doing.
I've seen this done befor on the likes of banking websites.
Is it a javascript?
I know the response.expires but that won't delete it from the history.

View Replies View Related

Edit Delete Page Comes Up Blank

I am having difficulty with an edit page with a form to edit/delete records in a database in ASP. User clicks a button that corresponds to the record to be edited/deleted. I have managed to eliminate error messages, but the Edit page comes up blank. I think there might be something wrong in the "rs.Open" statement. Code:

View Replies View Related

How To Limit No Of Records In A Page ??

On entering some parameters by the user, a form comes up with the values retrieved from the database (i.e. dynamic table is generated.) Also, I have a select all checkbox for selecting all the rows.

Since sometimes the rows fetched are more than 500, I want to limit them to 30 rows per page with the option to go to new page with select all checkbox (as in yahoo, hotmail inbox) . How can I achieve this ?? Code:

View Replies View Related

Get All The Records From A Directory Page In ASP

I have this page on a website in ASP which allows me to enter the Emp#. When I enter the Emp# I get all the data relevant to that Emp# like Name, Age, Address, etc

The present url doesnt change even after getting the results ( so I guess I cant pass the variable to the url) Is there any way to get all the records for employees with Emp# 1 to Emp# 2000

View Replies View Related

Display Records On A Page

i want records displayed on one side of the page and the other side i have a form where users enter data using the list that they have. i am able to list the records after or before the form but not to the side of it. how do i do that.

View Replies View Related

Records Not Showing Up As It Should In Asp Page

I am new to ASP and tried to do an ASP page up using FrontPage and Access. I have encountered a problem that even when I select all records in the database, the records are not showing in the ASP page as they shld be. Code:

View Replies View Related

Saving And Display Of Records In Asp Page

I need to build a asp page where it would serve as a data entry record page
as well as display page for records saved. This page should also allow
editing of records that has been saved. e.g.

SAVEBUTTON
SS# EntryBox Name EntryBox Date EntryBox Revenue Generated EntryBox

DISPLAY OR EDIT BUTTON

---------- ------------ -------------
------------------------
---------- ------------ -------------
------------------------
---------- ------------ -------------
------------------------

The process of the first part of saving record is fine. However, the second
part of displaying all the records that has been saved including the current
record saved is where I am having problems.

View Replies View Related

Search Records And Get Results On Same Page

how to create a search option that would search the recordsets in my database table.

I would be allowing users to search by name or date. I'd like the results in the same page. Any suggestions or tutorials?

View Replies View Related

Print 3 Tabular Records Per Page

Is it possible to print multiple records wherein there should be 3 records per page.Once the supervisor logged-in, there's a link where he can print all the records of his subordinates. Currently I have a print.asp file which gets all the data and arranged in aparticular format.

I've created a tabular form(interface) with proper arrangement of data. How can I set such condition, wherein there's only 1 form, but it should be printed on the paper depends on the # of records (3 tabular form per page, where 3 tabular form = 3 records of different people)? Is it possible? Do I have to make 3 tabular forms? If I'm going to do this how will I select or use the recordset?

View Replies View Related

How Does One Update All Records Displayed In A Asp Page

I got a test asp page which connects to Northwind.mdb database. This page
pulls all the rows from the Customers table. One column i.e. GoodStatus has
been added to the customers table. The following is the code to display all
records of the customers table with some customization. Code:

View Replies View Related

Limit The Number Of Records Per Page

I'm trying to specify how many records to be display per page. I put a limit of 40 records and i'm getting only 2 per page. The number of pages it seems ok but the records displayed are only 2 instead of 40. Code:

View Replies View Related

How To Read An SQL Server Into A ASP Page And Then Change, Add, Delete And Write It Back To SQL Server

I need to read a SQL Server table into a Web Page and within the Web
Page to permit my users to make changes to the records, delete or add
new records and then save the entire contents back to the SQL Server
table back.

The functionality I am looking is almost the same as In the SQL
Enterprise Manager whereby I can choose a table open the table and
then return all rows and I can maintain the same and save it back to
the SQL Server table. I want almost a similar web interface to such a
functionality.

Even if not a generic functionality as the SQL Enterprise Manager
table maintenance appreciate if somebody can share the code with a
sample how I can do it in ASP pages + T-SQL if need be.

View Replies View Related

Get All Records, But Display On Separate Locations On Page

I have a table with a number of 'advertisements', and each ad specifies a page display location (#1 - #9). I would like to query for all ads, but display them only where they have their location (see image above). I currently have 9 different SQL queries, one for each location:

"SELECT * FROM tb_ads WHERE f_adlocation = 1

I would like to have one query, and at location 1, simply say: "If f_adlocation = 1, then display here. If there is more than one, then repeat as necessary". Here is what my database looks like: I have attached sample data as a .txt file.

View Replies View Related

Can't Insert Records From Page With Request.form

I'm trying to insert records into an SQL database coming from a page using the request
..form method. The table "general" has a primary key 'geid .' I get the following error:

Cannot insert the value NULL into column 'geid', table 'general';

column does not allow nulls. INSERT fails.

....not sure how to include the 'geid' field into the scheme.

strSql = "insert into general (firstname,surname,company) values ('"
strSql = StrSql & Request.Form("firstname") & "', '"
strSql = StrSql & Request.Form("surname") & "', '"
strSql = StrSql & Request.Form("company") & "')"
myconn.Execute (StrSql) ....

View Replies View Related

Recordset Based On Records Selected Freom Previous Page

What I want to do is have a recordset with all records in and display a list by title with a tick box next to them, then goto a new page which the recordset is all the records that the user selected on the previous page.

View Replies View Related

Display Records From MS Access Tables As A Total In A Table In A ASP Page

I'm trying to display records from an MS Access DB (*.mdb) in an ASP page (table).. I don't want to display all the records though, I just want to display the total of these records..i.e in my table I would like to show how many calls someone has closed this year..(number)

Joe Bloggs ---> 100 Closed

Is this possible? I was thinking that I need to write an ADO that includes COUNT but I'm not too sure how to write this.. Here's what I have so far: Code:

View Replies View Related

Systematic Updating Of Records Depending On Amount Of Records In Another Table

The problem concerns 2 tables, cart_products and cart_shoppingcart.

Cart_products contains all the product data (eg, prices, product's key name, etc), but most importantly, it contains the quantity of stock (prod_quantity) for each item.

cart_shoppingcart contains all of the user's items in their shoppingcart, including those that are part of an (customer) order; these have the order_number to differentiate from those that aren't in any order (their Order_number is 'no_order', the others have the order number).

Now, what I want to do is this:

For every item in the order (ie, every entry in cart_shoppingcart that matches the username and order number), take the quantity (x) the customer is ordering, then take the quantity of stock remaining (y), then subtract x from y to create the new stock level (z) and update the appropriate record in cart_products with z (all this with SQl preferably).

I was thinking of using a Do while loop, but realised that it wouldn't work as I'd have to use several SQL statements and then I'd run into a problem the minute ASP reads "objrec.movenext".

View Replies View Related

Pulling Records From End Of A Database Or Inserting New Records To The Beginning

I'm trying to pull the last 5 records from my database.

<% j=5
rs.MoveLast
While ((j>0) AND (NOT rs_article.BOF))%>
''Execute HTML and data insertion here

<%rs_article.MovePrevious
j=j-1
Wend%>

Everytime I attempt to run this code, I recieve an HTTP 500- Internal Server Error. It tells me no more than that. I know that my connection settings are OK because when I move forward through the database (first five records), the code executes without error. And yes, my Cursor type is Dynamic.

Alternatively, I would also like to know how to add new recordset to the beginning of a database rather than the end.

View Replies View Related

Grouping Records Within Another Group Of Records

I have an Access database with two fields that I would like to group by. The two fields are location and department. Field names are "Location" and "DeptName".

I have the code correct for grouping by location. That code looks like this: Code:

View Replies View Related

FSO Delete

I have this code that deletes a file using FSO but it wont work Code:

View Replies View Related

ADD/DELETE In ASP

I am trying to delete all the records from one table and insert a few in the same table.
When I run the asp it gives me the error message

"Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables."

Before opening the connection to the database, I tried setting the mode to 3 as follows:

Set Conn = Server.CreateObject("ADODB.Connection")
conn.Mode= 3

Then I open the connection. But it still gives me the same error.

View Replies View Related

Delete Value

How do you delete from the objRs when you choose the value to be deleted form a dropdown menu?

View Replies View Related

Delete

i would like to be able to delete a record from a database this is the code i have atm but it is not working:

if request.querystring("action") = "delete" then
strSQL = "DELETE * FROM DVDDescription WHERE DVDDesc_ID=" & request.querystring("DVDDesc_ID") & ";"
objRS.open strSQL,conn,1,2
'objRS.close

end if

Code:

View Replies View Related

SQL Delete Timeout

I'm getting an error from something that seems too easy to cause
trouble. Here's the scenario. User fills out a form. User saves. On
submit, an asp script attempts to save the data. it deletes all of
existing child records, and then re-inserts new child records.

Heres the chunk of code thats bombing out with a 'Microsoft OLE DB
Provider for SQL Server error '80040e31' ':

'delete all children for this Parent record
strSQL = "DELETE FROM qcspec_is_tasks WHERE parentID = " & nRecID
debugPrint strSQL
cn.Execute strSQL

The print statement yeilds the following, before the Execute statement
dies:

DELETE FROM qcspec_is_tasks WHERE parentID = 20

If I run the above in query analyzer, it executes instantly.

Incidentally, at this point in time, the table is tiny. Its only 50
rows or so, at the moment.

View Replies View Related







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