Updating And Deleting Record
i have listing.asp to list all the records in both tables .i want to create a hyperlink to to update.asp in which this will update any fields that changed but i was able to update first table but having problem updating the second one. how can i update the second one as well . i have the same problem with delete too.
View Replies
ADVERTISEMENT
I am having trouble with the edit, update and deleting of records. I got the codes from a user in a different forum. Now I can't find ant help from that forum. Here is a link to a zip file with the pages and database in it.
bkdphoto.com/problem.zip
Simply open the listings.asp page then click on one of the Edit or Delete labels. I am getting the following message when I do:
Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/Tests/New Folder2/delete.asp, line 7
View Replies
View Related
I got an asp page that supposed to add,delete records from access 2000 mdb file. It loads all the records but when i try to delete or update i get these errrors. Code:
View Replies
View Related
I'm having trouble creating a one record recordset then deleting it. I've never done this before. The code below returns: "Type mismatch: objRS".
Code:
View Replies
View Related
i have a site that has several joins. I need a function that will go out to see if the master table is using a value from a dependant table before it allows the value in the dependant table to be deleted. nothing more than that.it could be a a simple js function that basically does?
rs = recordset
if count(rs) = 0 then delete field
else
if count(rs) is > 0 then "You can't delete this record"
View Replies
View Related
i have a shopping cart that gets its information from the cookie.
is it possible to add a remove item to my shopping cart so that i can delete a specific item from my cart?
View Replies
View Related
I have a tbl.pictures on my website, several of the columns have refferal links to images. Having read through another link on this site, apparently it's the best way to do it. (Keeping the images in file rather than on/in the database)
My problem is that when a photographer deletes a photograph from my database the image files remain on my server. For the moment its ok but long term when they delete the record I would also like the images to removed from my server.
Any ideas where I could start to look to do this?
View Replies
View Related
I'm trying to delete some record information but only a set number of fields. when i run the following, it deletes all the record and not the field information in the given records:
set rs = server.CreateObject ("adodb.recordset")
StrSql = "DELETE field4, field5, field6," _
& " field7, field8, field9" _
& " FROM tblStock" _
& " WHERE field1 ='" & Request("loc") & "'" _
& " AND field2 ='" & Request("pdt") & "'" _
& " AND NumberOut =" & Request(" numberout")
'DEBUG ONLY
'Response.Write StrSql & "<br>"
'Response.End
cn.Execute StrSql
View Replies
View Related
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:
View Replies
View Related
I have a form which displays a record from a database. The user can amend the form as they wish before finally pressing the update button. When I get to the page which does the updating, I am unable to access the form elements. I read on one post that you can't do this using the request command but you can achieve it using the Upload component?
Suppose my form has the following 2 fields:
- brideName
- groomName
My SQL that gets the record is as follows:
Select * From Users WHERE Username='" & User & "'"
How do I update the fields bride and groom in my database using the above form fields?
View Replies
View Related
Im trying to update a record in my database by using a form which the user will enter the name of the rep and then the form will update the database inserting the rep. My script seems to look ok and doesnt error at any point but when it goes to update it doesnt actually update anything in my database. Could somebody please take a look.
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
View Replies
View Related
What I am trying to do is upload a file and rename it - this part works Then, get the record and update the file name field with the strName - this part does not work Here is the uploading script: Code:
View Replies
View Related
I try to execute the following:
Dim rsCars,mySQL,CAR_ID1,CAR_NAME
set rsCars=Server.CreateObject("ADODB.Recordset")
mySQL="select * from CAR WHERE (ENDING_DATE < Now() AND MAIL_SENT=0) AND CAR_STATUS=0;"
'mySQL="Update CAR SET MAIL_SENT=1 WHERE (ENDING_DATE < Now() AND MAIL_SENT=0) AND CAR_STATUS=0;"
rsCars.CursorType = 2
rsCars.LockType = 3
rsCars.Open mySQL,objConn
'set rsCars = objConn.Execute(mySQL)
But, it doesn't work both ways , and gives the following error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
View Replies
View Related
My question is regarding updating records. I'm using Dreamweaver MX and a MSSQL database (using an OLE DB connection) and whenever I try to update a record, I only get record #1 to update. It doesn't matter whether I select record # 4 or 15, I can only update the first record. I followed this tutorial line by line so I'm not sure why it's doing this.
View Replies
View Related
I am dynamically building a query from an access db to output on a separate page. This is working fine.
On this page (the query results page), I want to have checkboxes and a text field where the user can input text and select the records to update (by checking the box). Once they select and hit submit, I want to update only the records selected.
Problem is, I am trying to figure out the most efficient way of doing this...any ideas?
View Replies
View Related
I have a very simple Access database with these fields:
ID | Team | Score
I want a user to enter the new score of the team into a form and then it's updated. All pretty straighforward - except I'm getting an error at the bottom of this page:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/forensic/update.asp, line 171
And when I submit the page I get this error:
View Replies
View Related
I'm getting this error message: Error Type:
Microsoft JET Database Engine (0x80004005)
You cannot add or change a record because a related record is required in table 'employees'. Code:
View Replies
View Related
I have an insert record form that posts fine to a db which automatically creates an ID how could I get the next page to do a preview using the ID just created by the DB to go to the right record?
View Replies
View Related
I have a .asp page which lists a date, then a bunch of record lines for data that falls within that date, then the next date and it's bunch of data record lines. e.g.
Ship Date: 04/06/04
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Ship Date: 11/07/04
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
What I want is:
Ship Date: 04/06/04
1: Data xxxxxxxxxxxxxxxxxxxxx
2: Data xxxxxxxxxxxxxxxxxxxxx
3: Data xxxxxxxxxxxxxxxxxxxxx
4: Data xxxxxxxxxxxxxxxxxxxxx
Ship Date: 11/07/04
1: Data xxxxxxxxxxxxxxxxxxxxx
2: Data xxxxxxxxxxxxxxxxxxxxx
3: Data xxxxxxxxxxxxxxxxxxxxx
How can I get these numbers printed againsts the records ?
View Replies
View Related
This code works fine, it deletes the record that already exist in the database and displays a message to the user the record has being deleted.... but it also it has a problem, if you enter a record to delete from the database and this record does not exist it displays the message that the record has being deleted, while instead it should display an error that this record does not exist in the database.
Code: ...
View Replies
View Related
Ive run into a little trouble. I am sure all of you have used hotmail. Well you know when you select all items to delete, i would like to do something like that, however not delete, but update a field from no to yes.
I would like to add checkboxes to an asp table. So if the user selects say three items they then click on a button, say marked and for each item, it will go to the table and find each record in turn and update the corresponding field from a no to a yes.
Updating is no problem. The problem is, how do i add checkboxes to corresponding asp table. So that particular checkbox corresponds to that particular record. I don't know how to link them together.
Can someone help me out please?
View Replies
View Related
I have a form that contains many pages. If someone clicks on delete, the application takes the user back to page 1 instead back on page in the breadcrumb trail. It is fine when the user is on page 2 but they could be on page 10 and click delete and then they are back to page one. I want to have the application go back on page at a time each time they click on delete. Here is what I have for code:
If LEN(page & " ")=0 Then
page = 1
End If
page = CInt(page)
If i = page Then
response.write "<font color=""#CC0000""><strong>[page " & cstr(i) & "]</strong></font> "
View Replies
View Related
I have a script which allows a user to upload and delete files from the
server.Is it possible (and if so how) to do a check to see if the folder is empty
(ie if the last file in a particular folder is deleted by a user) and if it
is empty, delete the folder?
View Replies
View Related
On my webpage users can upload files and also delete those files. Everything seems to work, but when they upload a file that contains spaces, I am having problems getting the file deleted, for example: "This is my file.txt"
Is there a way I can delete this file. I have tried to take out the spaces, but the file still doesn't delete:
<%=Replace(Request("MyFile")," ","+")%>
View Replies
View Related
this is my code but when i delete all the record there is error dispalyed ?
elseif (strType = "Delete") then
strSQLDelete= " Delete From events where id = " + ID
conn.execute strSQLDelete
response.redirect "eventform.asp"
View Replies
View Related
I am using cookies to store the user name and login state on the site. I am having some problems logging people out.
Firstly wanted to make the cookie values null but having some trouble with that
Response.Cookies("Login")("UserGood") = ""
Response.Cookies("Login")("Usercode") = ""
doesn't appear to do anything?
What would be really cool would be to delete to cookie in the logout script, can that be done from ASP?????
View Replies
View Related
I have a little app running in ASP which lists a bunch of files that are in a directory. This is attained using the following code:
View Replies
View Related
I'm trying to delete 2 files using fso. The mail file name is stored in an
access db.
using the code below I can delete the main file but not the thumbnail.
The thumbnail has the same file name plus the suffix "_small" so if the main
file is called "mypicture.jpg" the thumbnail is called "mypicture_small.jpg"
The main file is being deleted but no matter how I try I cannot get the
thumbnail deleted. They are both in the same folder with the same permissions.
Code:
View Replies
View Related
I'd like to have a remove all button in my shopping cart.
is it possible to delete a cookie with asp?
View Replies
View Related
I am using ASP with SQL for my database.The problem I have is that even after I have ordered certain items from the shopping cart table on the webpage, I cannot remove them -
that is the entire list shows up the next time the table is opened.
is there any way I can delete the items once ordered so as to not let them show in my table?
View Replies
View Related
How can I delete the files using ASP?Following is th code :
var objFso = Server.CreateObject("Scripting.FileSystemObject")
var strFileName = Server.MapPath(".") + ""+ "SubmittedDoc.xml"
if (objFso.FileExists(strFileName))
objFso.DeleteFile(strFileName)
This is not working.
View Replies
View Related
i cant delete data from excell which i use as a database with asp.i encounter an error report about isam. how can i delete data from excell
View Replies
View Related
i would like to delete a specific line of a text file. for instance, if the line i'm looking for is "abc", then i'd like to delete that line only (all the lines are unique).
is it possible to do this? or would it be easier/better to read all the lines into an array, delete the file, recreate the file with the lines from the array, skipping over the line i don't want?
View Replies
View Related