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 Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Insert Record
Is it possible to, whilst inserting a new record, use a session variable from a previous page for one of the fields?
Insert Record
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: 'Command1.CommandText = "INSERT INTO tbl_quotewedding (coverllevel, weddingdate, marqueecover, publicliability, quote) VALUES ('"" & session(""svCoverLevel"") & ""','"" & session(""svWeddingDate"") & ""','"" & session(""svMarqueeCover"") & ""','"" & session(""svPubLiab"") & ""','"" & session(""svTotalCost"") & ')" I know that the code below works OK so it must be something to do with how I've included the session variables Command1.CommandText = "INSERT INTO tbl_quotewedding (coverllevel, weddingdate, marqueecover, publicliability, quote) VALUES ('silver', '30/11/2004', 'No', 'No', '55')"
Insert A Record
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.
Insert Record
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.
Insert Record
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 %>
Insert A Record
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?
Insert Record
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?
Waiting For Db To Insert Record?
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).
Multiple Insert Record
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
Recalling A Record Insert
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?
Insert/update Record
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?
Error On Second Record Insert
Working on a order sys for a client. I go to create an order, no problem IF There are no other records in a specific table. It is working like this: create order #1...creates "order" in order table and adds 1st item in orderdetail table...add items to order in orderdetail table...no error. create order #2...creates "order" and gives an "HTTP 500 - Internal server error". this involves one ASP page, two tables and one SP. Here they are: Code:
Insert Record With Constant Text
I have a quick question regarding a text field for inserting record, I have a page which inserts various fields including area code an phone number for a new record, however I am curious if there is a way that I can either make the area code appear with brackets around it in the text field which is sent so that the user does not have to type it in each time. I was thinking I could concantenate the value i send in each time with brackets but am not sure what the syntax would b for this. or perhaps there is another way of doing this?
Restrict Insert If Record Exsists
Can someone point me in the right direction on this? There are 3 fields in the DB: model, rma, bagqty. If the values on a certain row are I530, 1108, 50 and a user goes to input the same data I dont want the insert to be allowed and force a new insert. I dont need someone to do this for nor do I want that, just need a push in the right direction.
INSERT Record To Database AND CDONTS
Is it possible to use CDONTS to send an email and INSERT a record to a database, once a form has been submitted. They work individually but I cant get the scripts to work together.
Insert Database Record Problem!
I'm having a trouble to insert data into the database. I can't understand what do I do wrong. I've got 2 pages , one is html with user registration form and another one is asp with the following code:
Insert Checkbox Values From Dynamic Record Set
A page displays the Product literature that a customer can request to receive by postal mail by clicking a check box. The literature selections are created by a dynamic record set based upon what the company enters into the Literature table (currently 10 selections). The checkbox form tags are: <input type="checkbox" name="LiteratureID" value="<%= rs("LiteratureID")%>"> LiteratureID is the Access autonumber primary key field. I can use the LiteratureName in the "name" attribute if it is easier. The form processing page needs to Insert each selection into its own record in another table. This "requested" table also inserts the database ID for the customer that is created after first inserting the customer contact info. In other words the "requested" table needs to record the customer autonumbered db ID and each selected checkbox value. Here is my current code:
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 ?
Insert The Same Record Using Two Different "submit" Buttons
I'm using DreamWeaver MX 2004. I'm wondering is there a way to have 2 (or 3) submit buttons in the one form, each one to insert the record & then redirect to different pages, depending on which button is clicked? I'm thinking about submitting all forms to one page & have that redirect based on a URL/ Form parameter. Just curious as to other methods.
Record Set
I want to download record set from my SQL database as csv format but in ZIP file .I can download as a csv file now ..But i can't put that in zip file and download.
Record
how to deal with multiple recordsets on the same page? It's gotta be something small and clear so I could understand. Somewhere I've read that multiple recordsets are not allowed when using Microsoft Access Database?
Set Record
I am looking to have some sort of SQL Trigger maybe? I have a field called 'dateActivated' and 'isActive'I'm looking to somehow say when dateActivated + 6 months then set isActive = false. I want this to be automatic. I am using ASP/VBScript if this somehow matters.
Add More Than 1 Record At Once ?
I have a form on an asp page which is used to add additional users to the DB, i.e. adding a UserID (PK on table), Password & Email. The companies are allowed a max of 3 users. If the company only has the default 1 user and wishes to add another 1 or 2, then the form displays the current user details, not in text boxes as this is not an adit data form. The additional user/s can be entered into 1/2 rows of text boxes, user 2 & 3. If they decide to add 2 new users, how do I add the additional 2 records to my db table on submit ? Code:
Record Set
i am tryin to run a search on a db and am using a like statement which works fine but i want to select what it finds and also the next 9 records any idea on how to do this
Second Last Record?
Is there any way to change the following code so that when it's the second last record in the set it doesn't put UNION ALL at the end? Basically, is there a way of saying: if SecondLastRecord then I don't know how many records there will be, so I can't count down from 7 or anything. Code:
Add New Record From Asp To Sql
Every time I try to ADD a new record from my asp page to SQL table, I got this error: Microsoft OLE DB Provider for SQL Server (0x80040E2F) Violation of PRIMARY KEY constraint 'PK_Cancelled_Classes'. Cannot insert duplicate key in object 'Cancelled_Classes' Here is the Insert statement: Sql="INSERT INTO Cancelled_Classes (yrtr, cou_id, cancell_date, Message)" sql=sql & " VALUES " sql=sql & "('" & Request.Form("yrtr") & "'," sql=sql & "'" & Request.Form("cou_id") & "'," sql=sql & "'" & Request.Form("cancell_date") & "'," sql=sql & "'" & Request.Form("note") & "')" ' conData.Execute sql
Record Set
I had a problem that happen once only but i do not want it to repeat again. It happen when i retrieve data from my database. The process can't complete and show error 14, Out of string space. I suspect the recordset object had reach it limit that why it generate that error message but what can i do to prevent this from happening
Add New Record
I have a siple script where I add a new row in a table which has also a autonumber field. Adding the new row I am trying to get this value of the autonumber field and put it in session, but can not seem to figure out how. I tryed to open a new recordset and pull it out but does not find the record I just added.
Add Record
Trying to learn a little asp and am trying to have my form (when the submit button is pressed) put the value in a field in my database. it worked the first time, I typed in the word testing and clicked submit. now whatever I put in there it creates a new field with the word submit. Can someone tell me what I'm doing wrong here? I'm positive there's something wrong with my code here. Code: If Request("submit")="Submit Questions" Then Set questionsubmission=connectionToDatabase.Execute("INSERT INTO kitchen_questions(questions) VALUES('" & database_select("questions") & "')") End If
Record Is The First In A Record Set
I'm looping through a record set and want to treat the first record differently. I've got a counter that I check to determine if its the first iteration through the loop, but I was wondering if there is recordset property that would indicate the record's position in the record set.
Get Record From Db
now i got all my data in my sql db table (fsearch) . now i want to take the value from the db to display it on the browser in the form of a table .
Using Record Set Twice
i need to use the same record set in my page twice. some optimization issue [img]images/smilies/biggrin.gif[/img][img]images/smilies/biggrin.gif[/img]. i have arecord set like this Code: set newsrs=createOBject("ADODB.recordSet" ) newsrs.Open newssql,cnn,3,3 and i wanna use this twice in the same page Code: do while not newsrs.eof newsrs.movenext loop can any body tell me how? coz when i do it the second isnot working [img]images/smilies/rolleyes.gif[/img]
Querying The First Record
how to locate the first record...i sorted the numbers and i want to display the first record based from the query...
Update Record
I am designing a site for a firiend using dreamweaver and unfortunately my link has gone down to my test server. I use dreamweaver to generate most of my asp but since I can;t do this with a broken connection I wondered if anyone would be kind enough to help me with a very simple bit of code. I simply need an asp page. That reads the first record in a db (db.mdb). the record has two fields ID (whish is 1) and news (a memo field). This memo field then needs can then be updated via a simple html form. Essentially its just a page that allows the user to update the memo field in the first record of the database.
Add Record On The Database
i use access database and made add record page and it is added on the database then i made another page to add on another table on the same database it is not working i donot know why,and the problem from me or from the server setting???
Want To Change Record
iam having problem ,relating to update a column in Access file in ASP 'Change' is column name , rs is recordset object ,and i want to update the values in 'Change' column by return values from a function .Iam using vb script in asp rs ("Change").value = function() this is generating error, and won't work
Empty Record
When there are no records for the certain row in my table I recieve this error: ADODB.Field error '80020009' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /admin/Fixture.asp, line 0
Record Set Paging
i am trying to expand the functionality of a page that is running on a paging script. i have tried several methods but cant get the results i want is there an index to a record set that has sequential values (from first to last) for the rows? if so how do i list it for each record?
No Record Notification
I have a page.asp?ID=xyz which redirects to releavant page and works if page exists but gives an error if not a valid page. How do I get it to redirect to an error message page being more user friendly?
Record Not Updating
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:
Update 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 ?
Record Selection
I have a form field called Streets that contains 'HIGH STREET,MAIN STREET' I have a field in my access db called StreetName a single record would contain one street and I want to return all records that have a StreetName in the Streets field. How would I go about this?
Record Search
i am wanting to put a simple search box within one of my pages, which will search a specific field of a table and display only the reaults matching those entered.
Delete Record
I been working on this code for a long time, code doesn't work and It also doesn't show any error. All I am trying to do is delete record. I click on id number from first page that brings me to this page. Code:
Record Sets
Is there a way for me to determing if a column exists in the table? ex. I have RS("var"), where RS is a recordset. My code is dynamic but some tables will have "var" while some won't.
|