Update SQL

how can i trigger a SQL (update query) by clicking a button in a asp page without further action in another asp page? Most grateful if some examples can be referred.

View Replies


ADVERTISEMENT

How To Tie RegID To Form To Update (batch Update)

Okay there is an unique EventRegID for every registration. When people first register they get pre-registered. Then an admin comes in and confirms or wait list them (based on whatever requirements). My question is how can I tie the EventRegID to a form with multipule ID's so they can batch confirm or wait list the PreReg list? Code:

View Replies View Related

Getting Rid Of $ For An Update

I have this page that displays a dollor amount code:

<td class="tableValue" width="122">Expiring Premium:</td>
<td width="400" align="left">
<input name="Expiring_Premium" type="text" value="<%=formatcurrency(Expiring_Premium,2)%>" class="tableValue" size="27"></td>

it would display $100.00 when i go to insert that value into the database the value i get is $100.00 and i get an error, i need to get rid of the $ sign but not sure how to do it because the number range can be from 1 to a billion dollars.

I have this code for asp that if the value is null it insert a null instead of a blank, else i get an error message in access.

'Expiring_Premium = request.form("Expiring_Premium")
if (request.form("Expiring_Premium")) ="" then Expiring_Premium = "Null" else _
Expiring_Premium = request.form("Expiring_Premium")

Any ideas on how i can strip off the $

View Replies View Related

SQL Update

I'm looking to update a column in a datebase that has null values with N/A and I'm using this:

UPDATE tbl_members
SET branch_no = 'N/A'
WHERE branch_no = NULL

The only reason I'm trying to do this, is because I can't seem to do if statement on a null value.

View Replies View Related

Update Box

This is hard to explain, but I have wanted to know how to do this. Say you have a website, and you have a news box(where you can report all of your news), made of a picture(s), you know like something that says "news" at the top of the 'box', and the sides of the 'box' are a picture. I have wanted to know how to make one of these 'boxes' without having to use the <div> tag, and type as much text in there as i want, and it wouldnt mess up a table or anything, or realign it, because the <div> automatically wraps around the text, fitting perfectly to it. I was wondering if you can 'wrap' around the text without a <div>, but with pictures. Here is an example, this picture called ex.gif.
I know it is a link menu, but what if you wanted to add a couple more links. How would you get the 'box' to automatically resize so that it does not messup the table. I am not even sure if this is capable in ASP, but I am sure somebody knows what I am talking about.

View Replies View Related

Cannot Update

I have a guestbook form that inserts the fields into an
Access Database. The database is residing in the "fpdb"
folder that was created by FrontPage. The ASP page that
writes the data into the databse uses the
"recordset.addnew" method. The code was working fine a
couple of weeks ago, and now all of a sudden the error
message "Cannot update.Database or object is read-only"
pops up. The ASP code or the database was not changed or
modified in any way, neither were the permissions for the
account.

View Replies View Related

Asp Update

I have quite strange problem and hope you guys can help me out or provide me with some tips.
when using a update script:
UPDATE categorys SET main_cat_default= '0', banner= '', b_link= '', external_text= 'Nākotnes parks', name = 'Arzemju muzika' WHERE (id = 115)

Then it messes up field EXTERNAL_TEXT. Instead of Nākotnes parks it saves it as Nakotnes parks.
But! when I open Enterprise manager and type in Nākotnes parks manually then it saves it correctly. So I believe there is something with update command or smthing like that.I changed collation also to Latvian and this did not work.

View Replies View Related

Update My Own App

For laptop users who have an ASP application running on their laptops
- is there a way I can have it check when connected to the network
(via the FSO lastmodifieddate) which files need to be updated
(enhancements, etc.), then shoot the ASP pages that have changed down
to the client?

View Replies View Related

Update Db

I'm using the following code:

rs.addnew
rs("application")=body
rs.update


body is containing a lot of text with vbcrlf in it.This is basically a form that is emailed and I want to save it to a db just in case the emails don't go through.
For some reason the field in the db (access) is only containg the first line until the first vbcrlf

View Replies View Related

Will Not Update

I am updating some pages "font "style color size" and a few words in several of my asp pages. Most of them will update but I have a few that refuse to even after rebooting the server and clearing the cache on my current computer.

View Replies View Related

RSS Update

I was able to generate an RSS for the news I provide with ASP and MS SQL backend. When I opens it its working fine with any RSS reader, But its not getting updated, when I update the feed. Its showing the one which I made the day one, How to rectify and what could be the problem.

View Replies View Related

Sql Update

Any ideas why this is not working?

SQL = "UPDATE Answers SET Answer = '" & Replace(FieldValue, "'", "''") & "', UserName = '" & UserName & "', SurveyDate = '" & SurveyDate & "', Respondent = '" & Respondent & "', CompanyName = '" & CompanyName & "' WHERE QuestionID = " & QuestionID & " AND IntervieweeID = " & ID & " "

This is what it prints:

UPDATE Answers SET Answer = 'Answer Test', UserName = 'John Doe', SurveyDate = '08/03/2004', Respondent = 'Respondent Name', CompanyName = 'Company Name' WHERE QuestionID = 1705 AND IntervieweeID = 5

View Replies View Related

Get Value For Update

I have a database that has numbers in the fields, is there a way I can use the update command to take the value that is already in the field and add another value to that value. The value I want to add to the value alreay in the db is stored in a variable.

View Replies View Related

Update Does Not Update

What I'm trying to do: I have selected one record on the asp page and I want to replace that and save it to the same record. It is a table with two fields (Website and Updwebsite).

When I open the page, the correct data I want to edit is given, but when I change that and submit, the same data is returned and I even don't get an error on the page. So, I think it has something to do with the update query. Code:

View Replies View Related

Update

Hey everyone I have a drop down menu that selects a few fields and displays the results in a table. Each product has a link to a page that displays all the information about it. I want to be able to update this information in this form. The problem i'm having is with the id, the id is passes from the table to the form, but when i go to update the "new" data i get an error that says: Syntax error (missing operator) in query expression 'ID ='. I'm assuming that this is due to the product id being lost, how do i pass that value on. my code:

View Replies View Related

UPDATE Method In ASP,SQL

i am trying top update a field in my sql database but it wont let me??? does anyone know if my syntax is correct?? I have a field called userId in the database and want to replace it with my form request. Code:

View Replies View Related

Update Command

I am having trouble trying to figure out how to properly enter a checkbox in the SET statement so I can update the checkbox value based on user's input.
I know for number values you enter the variable like this:
Code:

Owner = own

and for text you enter like this:
Code:

Priority = 'pri'

and for dates you enter the variable like this:
Code:

tdate = #td#

but how do you create the variable in the SQL statement so it updates a checkbox value?
Below is my SQL statement, and the checkbox name is "Active" Code:

View Replies View Related

Update Syntax

I am trying to update my database with hidden fields that are being requested from a previous page such as:

hfSectionOneScore
hfSectionTwoScore
hfSectionThreeScore

I'm not familiar how to write an UPDATE statement, and would like some help. I'm thinking that it is something like this:

UPDATE Director_Appraisals SET

Section1Score = request("hfSectionOneScore"),
Section2Score = request("hfSectionTwoScore"),
Section3Score = request("hfSectionThreeScore"),

WHERE UserID = request("hfUserID");

Of course there are more columns, but am I on the right track? Does the syntax look correct?

View Replies View Related

Update Script

Hi can someone help me with an update script?

I have been trying to enable users to edit their message.

They can display their messages and with every message they have edit link that they can click to go to the edit message section which display the message details (title, content and date) in the form fields.

Once they altered the message they can update the ,message by pressing the edit button (similar like submititng a form).

But so far I am unable to update the message. I only get the

HTTP 500 - Internal server error
Internet Explorer

I have tried other update script but failed so far.

View Replies View Related

How To Update Checkbox !!

I have problem in updating checkbox (true-false) using SQL statement.

View Replies View Related

Update Problems!

i m using MS Access! I have this page "EditProduct.asp", which has 2 boxes which gets filled according to the Product Id i send from previous page.

i Want to existing data in those 2 boxes and when user edit the data, i send the data to same page, update db and then redirect to the previous page.

The problem i m facing is that when i edit the data, one field shows me numbers like "-1" or "0" and the other field just show me the same data as before editing!! Code:

View Replies View Related

Update Statment

i have this variable:

name="Jones, andrew"

when i update the table it gives an error

here is my update code:

str= "UPDATE tblnames SET Name = '" & name & "' WHERE Id ='" & getid & "'"

can someone tell me whats wrong with it because the name variable has a comma in it.

View Replies View Related

SQL Update Error

SQL gives an error but why?

SQL="UPDATE tblLog SET fldOffline=1 WHERE fldTimeIn='" & session("time") & "' AND fldUserName='" & session("admin") & "'"

and db is:

fldID=AutoNumber
fldUserName=Text
fldTimeIn=ShortDate(Date/Time)
fldSID=Number
fldOffline=Yes/No

Error:

Microsoft OLE DB Provider for ODBC Driverserror '80040e07'[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

View Replies View Related

Update Statement In ASP

I am trying to run a update statement to update a Microsoft Access database. Can memo fields be updated with ASP. I keep getting an error when the statement gets to the memo field?

View Replies View Related

Update Certain Record

i just wanna know how to be able to update certain fields without touching the others

for example if the form has 3 fields
description, name and age....

if i wanted to update the database from these fields, but only update the description while leaving the ohters as they are, which means blank fields in form...

now if i do that on my form, it will clear other 2 fields in the database and only update the description... how can i fix that so that when there's blank fields in form in won't clear the data in database ?

View Replies View Related

Update SQL Statement

I started here only it doesn't work with single quotes in the name. It does work if there are no single quotes.
strSQL = "select * from Members WHERE co_name = '" & request("coname") & "'"

I get this error Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'co_name = 'aa'a aaa'aa''
So I tried this:
strSQL = "select * from Members WHERE co_name = '" & replace(request("coname"), "'", "''") & "'"
It kind of works but stops outputing at the first space it encounters. It works good if there are no single quotes in the name. I'm writing the output to an input box.
In fact here is the code for the input box:
Response.Write "<td><input name=coname tabindex=5 value= '" & objRs("co_name") & "'></td>"

View Replies View Related

Update Access DB

Here is my code:
Code:

Set cnn1 = Server.CreateObject("ADODB.Connection")
openStr = "driver={Microsoft Access Driver (*.mdb)};" & _
"dbq=" & Server.MapPath("fpdb/directory.mdb")
cnn1.Open openStr,"",""
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "Update shops set image = " & img & " where shop = " & session("biz")

rs.Execute(sql)

rs.Close
Set rs = Nothing
cnn1.Close
Set cnn1 = Nothing

I get this error:
Object does not support Execute method

View Replies View Related

Update Statement

chk whether i write correct or no..Code:

SQL_query1 = "update Activity_Status set TotalTime = '" & Request.Form("time") & "', Score = '" & Request.Form("QuizScore") & "' where UserID ='" & Request.Form("username") & "', ActivityName = '" & Request.Form("QuizType") & "'"

View Replies View Related

Problems With Update?

when trying to update an access database i get an error with sql statment message the db table is spares and fields are,

location, machine, part_desc, part_number, qty, min_qty and updated by

anyone any ideas? Code:

View Replies View Related

Update Recordset

I figured out the code to insert into my table but I need to add data to a specific recordset. This is the asp page the data comes from: Code:

View Replies View Related

Update Db With Checkbox Value

I want to use a check box to update a field if it is checked. I have:

<input name="expr_date" type="checkbox" id="expr_date" value="<%=newExprDate%>" />

this doesnt work in either way - the record field stays the same if the box is checked or unchecked.

Is this possible - where am I going wrong?

View Replies View Related

Can't Update Database

I have a simple database. I can get the data from the database and display them on a web page without any probs.

My problem comes when im trying to insert new records into it. When i submit the data i get an Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot Update.
Database or Object is read-only.

I've tried looking at the properties of the db but i can't figure out why it is read-only.

i have one .htm page passing the info onto an ASP page and then showing the results on another page. The code for my two pages are (if it helps): Code:

View Replies View Related

Simple Update Where?

Ok how do i update based on 2 Where options
i know this is wrong but i don't know how to do it.

strSQL = "UPDATE [Job Contract Assignments] SET currentassignment = 0 WHERE cnum= '" & cnumqs & "' "&" WHERE currentassignment = -1"
SQLconnect.Execute(strSQL)

View Replies View Related







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