I'm having a spot of trouble trying to update fields in a access database using asp. I can delete and add fields thru the asp page but when i attempt to modify the fields i get a page not found error message. Code:
this is a problem that is cropping up for the other developer here and i can't seem to find anything wrong. this code has worked for months and then the last couple of days it started sporadically not working. i'm thinking that it has to do with a performance issue but i'm not sure.
i don't use the ado .addnew or .update, so i'm a bit unfamiliar with the workings of it. here is a brief overview of the code.
ordRs.AddNew ... do the field updates ordRs.Update order = cint(ordRS.fields("order_id")
the problem is that order sometimes ends up as null, it's not getting the order_id field after the update. like is said, it's sporadic. anyone have any thoughts here?
ive got a table filled by a recordset with a column named "STATUS" each record is a sale transaction. the status of this transaction is either open or closed. right now the table displays whats in the database as is, but i want to add the functionality to be able to close a transaction from the table. i was thinking of 2 methods, one would be a check to see if the field = open, and if it is, make that field a link to a small popup that verifies the user wants to close the transaction then does its lil sql thing aand updates the table. the other way i was thinking was to check if its open and make it a drop down list that will update table when submitted. im veering more toward the former idea(not a fan of drop downs)
The code below is a bit more representative of what I'm doing:
<!--#INCLUDE FILE="Database_Open.asp"--> <% sql ="SELECT * FROM CustomerBase WHERE " & _ "UserName='" & username & "' AND " & _ "SECRETWORD='" & password & "' "
RS.Open Sql, Connection, 3
IF RS.EOF THEN 'redirect code here ELSE RS.Fields("Fullname").value = "Bob" RS.Update %><!--#INCLUDE FILE="Database_Close.asp"--><% Response.Redirect ("Menu_Account.asp") END IF %>
i have a phone field in one of my tables. the data is pretty ate up. there's some numbers with .,- and extra spaces among other things. how can i do a mass update i would like to have all the phone numbers formated like this 555-555-5555 .
I have a asp form that has a dynamic drop-down box that a user selects a value from. Once the user makes a selection I use the onChange event to capture the selection and pass this value to a vbscript sub.
The sub then makes a adsi query using this value to retrieve additional information. This all works. I used a msgbox to display the retrieved value and it is correct. My problem is how do I update a field on the form with this retrieved value?
My products table has a weight field that I need to populate. A bunch of them have it and a bunch of them don't, but I need them all to have one. The weight is the same, 3, for all the records. I also have an Include field in that table. I want to make the weight field 3 for all records where the include field is true (it's a yes/no checkbox in access.)
I'm using Dreamweaver and I can build the SQL statement just fine but I'm not sure of how to loop through this to set the field for each of these records.
I am developing small asp application.There is a database called db.mdb and there are three tables(tblUser,tbsImport,tblcitylist) In tblcitylist there are two fiedls
1.Town 2.LReg
According to the relevent town there is a LReg (Lreg is a name already assign to the town) this part is ok.
In my tblUser there is a field called Town and LReg (Same as above table) But here LReg is empty.I mean there is a default value called "N/A"
I need to create a asp page for following purpose
* i need to read tblcitylist table and according to that I need to fill the LReg fields of TblUser Code:
Okay Whenever a user logs in we want to track the last time they logged in. My login script worked perfect before this now I can figure it out. All I did was add the way the table opens and the objRS.Update. Code:
I've declared a variable for the current date and want to use the UPDATE function to update the date field in a single record.
UPDATE lms_users Set leaver_date ="&MakeDate" WHERE user_id="473"
I know I have the date format in the variable as if I response.write it to the screen is displays correctly (28/08/2004). I must be doing something really silly, but can't see it.
I have a form where the first field is a dynamic drop-down that pulls from a db (Access). The fields associated with the query are task_id, task_name and task_rate. The field has the value of "task_id" and the label of "task_name".
In the second form field, I would like the default value to be determined by the selection made in the first field. Based on the selection of the first form field, I would like the default value of the this field (task_rate) to be populated with the associated task_rate value of the selection chosen above.
I had made a form name 'dform.html' which asks idno, name and phone from the user and after the user clicks on button "save data" sdata.asp is executed. sdata.asp is written to save the values entered for idno,name and phone in dform.html into table "myfriends" in the mydata.mdb (access database). but when i am clicking on save data button i am getting error saying
"Error Type:
Microsoft JET Database Engine (0x80040E09) Cannot update. Database or object is read-only. /SDATA.ASP, line 9"
can please anyone tell me why i am getting this error.
What I would like to happen on this page is that when a user selects a company name from a drop down list, his selection autopopulates the cID field based on the selection. The drop down list is getting its choices from the customer table.
As I am still a novice, I am sure there is a way to do it I have not been able to get it right. Code:
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:
I have an employee directory asp application. Everything works the way its designed but I want to make some changes. When someone does a search it of course comes up with a list based on their search.From there they click on the persons name and it opens the edit asp page which they do and update.
What I'm hoping to accomplish is to some how save the search criteria and one they update the page it will return to the previous page and redo the search so they don't have to redo the search to do another update.
I have a table called WGDeliveryNotes which has a field in called TrackFlag1.I would like to update the TrackFlag1 field to contain a value of 1 when the page is loaded..... I currently have this set within the ASP tags at the top of the page, thinking that this would update the field as the page loads however this doesn't seem to be happening.
i have 2 databae files in MS ACCESS format and i have already connected them from 1 ASP file and now i need 2 update the econt 1 from the firt
in another words :
i have 2 access databases
the first which is called 1st.mdb i allowed my visitors 2 rigseter and edit their membership in it across my website.
the second which is called 2nd.mdb have the same structure of the first(tables and fields) but in another url. hat is the best way 2 update the 2nd.mdb from 1st.mdb of course i donot wanna caopy and replace i need some programmatical method.
I have found out that when using dreamweaver MX 2004 to update databases, and specialy for amatures such as myself, it is easier to update one field at the time. Other wise you will get an error message on the line stringname.execute (usually line 111).
The problem is solved by updating only one field at the time. It might time a little longer but saves headaches when you don't know exactly how to work with the code.
I need help with fixing my code below. It doesn;t work correctly. It works fine when there are 4 featured records. But I want to be able to change one to not be featured (equal to 0). This is not possible with my current code. It shows the same message about me not being able to have more than 4 featured records. Can someone please help me with this?
I have a problem when i try to update a database!!! I am requesting a firstname text field from a form and an id number to find the row in the database.
But when i execute the following code to update the firstname i get the error:
Error Type: ADODB.Recordset (0x800A0BCD) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. Code:
The code that i have presenting allows me to view the database entries and to choose what i want to edit and then to do an update. Its not allowing me to save my new changes back to the database. Code:
What i want to do is, I have an excel speadsheet that scans items and then fills in other fields (if that makes sense), what i want to know is I want to insert that info from the spreadsheet into a database used on a web site, line by line would be fine, i can do the insert bits fine, and the loops but, first is it possible and how do i link to the spreadsheet and get the info?
i am getting a prob. in database id is a autonumber .i want to update value after retriving the va,lue from database .that is going on i mean retriving valuue from database but not update. Code:
how do you create a link that will add 1 or subtract 1 from a number in the database?would it have to call a function that would do it or would i have to use buttons that did it?
We have a fairly large datbase containing thousands of part numbers, product names and pricing. We used to update new pricing changes individually by hand. However, now that our database has grown substantially, I'm wondering what the best method would be to keep the pricing current on our database?
We can obtain new price lists in excel format, however, the part numbers the mfgs use may not necessarily coincide with the part numbers we have. Should I just write some SQL script? Look into using XML? What would be the most efficient way to tackle this problem?