Deleting Field Information In A Given Record

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


ADVERTISEMENT

Deleting Record

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

Keep From Deleting A Record

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

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 View Related

Deleting A Specific Record From Cookie

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

Deleting Record And Images From File

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

Information From A Memo Field

I don't know what i am doing wrong. I have an access database,and One of my fields is
Memo format. So when i try to display the information in that field, I was unable to do so, nothing would come up in IE. but the data is there in the fields.something like this.

response.write(rs("description"))

when i changed the field to "text" format, everything worked perfectly fine, ASP was able to display the information stored in that field. But when i changed it back to memo, it would display nothing.is there like a special way of displaying information stored in a Memo field?

View Replies View Related

Retain The Field Information

Can anyone tell me on how to retain the information that was being key in previously and mark which field was being filled in incorrectly rather than reset all the field to previous value?

I have done checking like this but i think it is not quite user friendly:

function verifyBlank(thisForm){
if (thisForm.TeachersName.value == "none" || thisForm.Lab.value == 0 || thisForm.Class.value == 0 || thisForm.Subject.value == 0 || thisForm.PeriodFrom.value == 0 || thisForm.PeriodTo.value == 0 || thisForm.Day.value == "none" || thisForm.Month.value == "none" || thisForm.Year.value == "none")
{
alert('Incomplete information');
return false;
}
return true;
}

View Replies View Related

Displaying Information Based Off An Empty Field

I've been searching for an answer to this for quite some time now and have found nothing, so maybe (hopefully) someone out there will be able to help me.

At my work, we have a lot of folders for different jobs we've done. And right now, we have more than one person making the folders for all the new jobs that we get. I am trying to make a database were it will only show the jobs that have not had folders made. In order to do this, I've created a field titled "Initials". I want the webpage to pull up all the records where the Initials field is empty, but I'm having trouble doing that. I've tried a few different things and have found no success.

I'm not having a problem accesses the database or updating it, just displaying the right information. I'll give a little illustration (because I'm never good with words):

Say I have 3 jobs: Job #1, Job #2, and Job #3. Someone has already made job folders for Job #1, but Job #2 and Job #3 still need to be made. Since Job #1 has been made, that means there are initials in the initials field of the database and thus, I do not want that Job being displayed on the "To Be Made" page. Job #2 and Job #3 do not have initials in the initials field and as such, I want to display those jobs....

View Replies View Related

Updating A Field In A Record

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

Select Only The First Few Words Of A Record Field.

Say I have a field containig some text, for example: The quick brown fox jumped over the fence. How do I only show the first 4 words of the sentance, i.e: The quick brown fox...

View Replies View Related

Can Not Update A Record If There Is A ' In The Text Field

i'm trying to figure out why i can not update a record if in the text box there is a ' anywhere in the field..

View Replies View Related

Getting Record Increment To Display In Form Field

How would I get the max record + 1 to auto-populate in the GMVINC form field? I have a feeling that my query is not correct. Code:

View Replies View Related

0x80004005 Error, Cannot Add Or Change A Record Because A Related Record Is...

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

Insert Record Goto Last Record

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

Record Numbers Against Record Problem...

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

LEFT JOIN On A Date Field And A Numerical Field - Using WHERE Clause

I am using a Relational database for my site and i have the following tables:

FIXTURES, GAMEDATES

the fields in FIXTURES are:

GameDate
Home
Away

(All of the above are numerical fields)

the fields in GAMEDATES are:

DateID(integer)
GameDate(#Date Field#)

What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)

The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:

WHERE Fixtures.GameDate<=(Date())

obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.

The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.

Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data

View Replies View Related

Deleting

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

A Little Like Hotmail Deleting......

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

Deleting A Page

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

Deleting Folder

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

Deleting A File

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

Error In Deleting

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

Deleting Cookies

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

Deleting A File Using ASP

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

Deleting Thumbnails

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

Deleting Cookie

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

Deleting Records

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

Deleting Files

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

DELETING EXCELL

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

Deleting Text

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

Deleting Old Version

I have a problem of deleting old version of files. This is wat happens: Client side sends a few files to the server side via http and are saved into a folder. I need to delete these files when another batch of files are send next time. Any suggestions to solve this problem.

Timestamp is out of question because it is not reliable to use time to differentiate between files within the same batch and other batch. Sometimes the sending might be delay by server. Therefore i need to come up with some sort of detection for new batch.

View Replies View Related

FSO Deleting Files

i'm using the following code to delete a file but when i execute the script it just freezes until timeout. any idea of the problem?

'///DELETE ORGINAL FILE
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile "C:Documents and SettingsGavMy
DocumentsDateWebsitewwwuser_images" & filename
Set objFSO = Nothing

View Replies View Related







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