I have to compare 2 tables: orderA and orderB, if the record exists in both table orderB and orderA, just do a update to the quantity field in orderB (add orderA.quantity to orderB.quantity). Otherwise a new record has to be insert into orderB.
Do I have to loop through the recordset of orderB, then use select statement to see whether the record exists in orderA or not, and determine whether to update/insert record? I am using Access database. I just afraid that looping through each record in recordset (maybe >=30 record each time) would make the transaction getting slow (or even hang??). Can I do this in one SQL statement?
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?
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 ?
This is probably a easy answer for you guys. Just trying to find the easiest way to do this. I want to click on a link and update a field in a recordset, but don't want to leave the current page.
HrngID is the link. I want to change the Canceled field from a 1 to 0 when clicking on the link . I know I can use a onclick event, but not sure if these is an easier way. Can I do like a onclick and run a SQL statement on one line?
I am using Windows XP profesional and Access 2000 but are experiencing problems updating or adding new records to my database with asp. I have installed IIS 5.1 on my computer but also on my internet site I am having problems to add a new rec. or update one.
The error message is something like:
< Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. >
I get this message on my web site as well as when I try some new tests, with other databases, on my local PC's IIS. Does anybody know what is wrong? It used to work okay earlier on my web site?
am trying to get my ASP page to write session variables into an Access database. However I'm getting error messages. I'm not sure if I used the right syntax (using double " for example) Can anyone see a problem:
ive created a database using access, and ive successfully created a ole db connection to a webpage using dreamweaver. i can view records without any problems but when i try to add a record tothe database from a webpage form i get the following error msg
Microsoft JET Database Engine (0x80040E14) Syntax error in INSERT INTO statement. /guitarguide/guestbook.asp, line 115,
the field names in the database table start with txt_ e.g. txt_name, txt_email etc.
need to retrieve a record from a table (tblBookingForm) in one database and insert it into a table (tblNetServ) in another database on the same server,leaving the original record in place.Cant get my head round it though, doesn't seem to want to connect to 2 databases at the same time.
I want to submit a record to my db via a simple form but return the user to the same page upon submission ie place a form on index.asp and the form action="index.asp".
My logic isn't quite right, can someone guide me in the right direction? This is what I have, upon submitting the details the page just reloads and the record is not inserted.
<form method="post" action="index.asp">Name<br><input type="text" name="Name" id="name"><br>Email<br><input type="text" name="Email" id="email"><br><input type="submit" name="submit" value="submit"></form> <% If Request.Form("submit") = "submit" then call MailList End If %>
I am inserting a record into a table to hold information about photos and what to create a folder with the same name as the primary key value of the inserted record. Eg if I have a table (tblAlbum) with two fields (albumID, albumName) and run an insert statement 'INSERT INTO tblAlbum (albumName) VALUES ('test album')`.
I want to then create a folder with the new value for albumID. How do I retrieve this new value just created?
I am using Dreamweaver to create the insert record code for an access database. When it adds the code, I can not see the page on the website. If I remove the code the page works fine. I'm not sure what is going on?
i have an access database that has an autonumber as the keyfield. how do i add a record with the autonumber left out so it is put in automatically by the database. i have this at present as my sql statement but dont know what to put in for the autonumber:
I have a form that pulls existing information from a database and allows users to edit it. Every field can be left blank if the user wishes.
I am having an issue with determining which SQL statement to run. There has to be an easier way to do this then what I am doing. For each filed I process the data this way:
SQL2="select * from 1985ClassList where MailingListID =" & Session("EID") set aData = oConn.execute(SQL2)
i can add the record in first table but cant get it to do with the second one one of the field in the first table the "mktid" which is the primary and is a forgeiner key in the second table how can i have it insert or update in the second one Code:
add/update a record in first table and 2nd i can add the record in first table but cant get it to do with the second one
one of the field in the first table the "mktid" which is the primary and is a forgeiner key in the second table how can i have it insert or update in the second one
I have a table in the db and one field in the db is an email field various records can have the same email address in. When an email address changes from x to y I want to be able to change an email address x in every record in the table to y, how would I do this?
ASP VB. I have 1 recordset where I pull the order in. I have another that I pull in the on-hand qty. I used a repeat region and now I have it working to display the new on-hand qty. Now I just need to update the recordset with the qty on hand.
Just a quick question more about the flow of an asp page. IF I have code as below: -
MyDBConnection.Execute "Insert Record Into A Table" MyRecordset.Open "Retreive the same record from the table"
Is there any chance that the connection process (Inserting the record) will not have completed by the time I try to retrieve the record. I.E. will the asp page wait for the insert to complete before continuing to open it (the next command in the page).
i want to insert some records to Access Database using the checkbox.i've try all the example i've found but it does't work.it's like checking our yahoomail.but i want all the tick checkbox insert to database
I want to insert a record into a DB and then immediately recall what the ID is. I have heard that there is a way to do this with SQL Server (although I haven't done it yet). Unfortunately this is for Access.
I've done some workarounds for this in the past but want to know if there are better ways. What I've done in the past is to recall the file name or something from the FORM collection against the DB (assuming this file is unique).
Using aspupload, if the overwrite attribute is set for FALSE I can use that as a way to better ensure the file name is unique as it renames the file if it is not unique. The problem is I need to to this without aspupload now.
I had thought of recalling the last record ID from the DB on the FORM side and putting it in a hidden field but this seems risky. Any suggestions?
I am submitting a comment box from a form into a database field that I have declared as text (16). When I type in a small amount of information, it submits just fine, but when I enter a substantial amount of data then I receive an error. I've tried different field types, but I keep getting the same error.
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 's'.
I want to insert the element selected by the user from the drop down box in the DB(Access).Once the user hits submit i want it to insert this in the DB + i want to update one of the fields from True to False . how can i perform both these at the same time?
The data that is entered into my website needs to be sent to someone else. Currently it is being put into a MySQL database. In addition to this, a third party needs this information. They have something set up on their website where I can do this:
I have no control over domain.com. How can I update the record, send the data to this URL, and then redirect the user back to the default page? Right now it just inserts the record and then redirects to the default page. I'm unsure as to how to do the URL bit. I would prefer if the user did not see the domain switch.
After the page (transactions.asp) loads I want to allow the user to enter the number of transactions into the provided textboxes. Then, when the user clicks submit, I need to have all the hidden fields as well as the number of transactions values inserted into the transactions table of my database?
I have attached the database should you have any questions about the db table values and fields. Please let me know if you have any questions or need more information or files.
can u tell me of a simple script i can use to do the following. I want a textbox to add a entry to the database with a submit button, then below all that the current database entrys are listed below also in textboxes with a UPDATE and DELETE button beside each entry.