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.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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?
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 ?
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 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.
Move To Next Record
I want to move to next data in the data set, however i am not sure what is the syntax. Can anyone who know please advise me?Code: strsql = "select main_cat_id, cat_name from main_categories where main_cat_id in (26,27,28,29)" set rs = connectdb(strsql,strconn) for i=0 to rs.recordcount response.write rs("main_cat_id")&"<BR>" rs next next
Update Record
this are my fields; sno, snm, grade i have 3 records and populate with a textbox Code: do while rs.eof ...... ... rs rs.movenext loop when i click the submit button, it will update all the [gade] of all the records
Characters From DB Record
What I am trying to do could be simple but I have no idea how to it. I am trying to display only a part of the record retrieved from database. I have retrieve data from database and I show it in normal way <% = oRs(0)%>, the problem is that I want to show only 100 first characters and then make some thing like this … after 100 first character. In this way all the data retrieved would look the same in the page.
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:
Edit Record
I'm currently thinking of a good way to edit records from using an ASP page. I got the page to display the table (all records) and next to each record, there's a button to "Edit" and "Delete", so basically the GUI is sort of ready to go. But for the functionality part, I'm pretty much stuck. Please give me some ideas in how to make this work. Here's what I've got so far:
Inserting Record
i've tested my code and it seems to send back an error, when i'm trying to insert a record into my db (sql server) Basically when I udpate one of the records it's fine ( I update at a certain "productID") But when I insert a new record it sends back an error telling me that my "productID" can't be a null value?Any ideas on how to fix this?
How Do I Delete Record Using ID ?
I am trying to delete a chosen record out of my Access database using the ID field as the parameter. I can get the script to output the record so I know it has the record, it just won't delete! Code:
Delete Record
I'm simply trying to check if the categoryid is currently being used by any catalogue/product items. Ok, I've created a mini site content management system and I'm stuck on this function that will ensure data integrity... I'm trying to check if the categoryid I'm trying to delete has any related 'catalogue' items (products); and if so display a message 'Sorry, there are items currently listed under this category. Move the items before trying to delete'. Basically disallow the delete function if any catalogue items share the categoryid. That's it! Simple... right??? Code:
Record Set Updation
i want to save an img file along with the form fields. I post the form fields to an '.asp' file where all the server side scripting works very fine but the database did not get update. and i do not get any type of error at the same time.
Records After 10 Record
Is there any way to read the records after every 10 records from database. I dont mean paging recordset here, but I need to do that to generate table cells. What I mean here is for example if we have 50 records in a table, how can I get the every 10th record say, 40th, 30th, 20th and 10th record only . Is there something like skip command in SQL or ASP?
Getting Spacing In My Record
i use this set of codes, arrModels = split(request("model"),",") arrSerials = split(request("serialno"),",") arrQty = split(request("qty"),",") not sure why when i do this sql for i = 0 to uBound(arrModels) sql = "INSERT INTO TableInventory (SerialNumber, Qty, ModelId, Hostname, IPAddress, LocationId) VALUES (" sql = sql & "'" & arrSerials(i) & "', " & arrQty(i) & ", " & arrModels(i) & ", '" & request("txtHostname") & "', '" & request("txtIPAddress") & "', " & request("Five") & ")" response.write sql & "<br />" next response.end i get the second serialnumber with a extra spacing infront. can advise me? Code:
Querystring = Record
I try to do the following. <% If Request.QueryString("id") = (rs_name.Fields.Item("ID").Value) Then %>Hello 1 <% Else %> Hello 2<% End If %> But there seems nothing to happen, when I go to the url name.asp?id=1 it still shows Hello 2. The db connection is okay. What do I wrong?
Auto Add Record
I work for a large company and the outside supervisors are not that computer savy. The simpler the better. Each supervisor has 15 employees that he must assign work for each day(Monday through Friday and sometimes Saturday). I am trying to create this so they can click on a button it will add 15 new records to Table A that are copied from the day before. Then they just have to update the new records with today's LocDate and a new location if needed. Code:
Single Record
I have a table with one header, everytime I use this code (below) it returns EOF and I know for sure there is at least a zero there:Code: set rs = server.createobject("adodb.recordset") rs.open "SELECT myonlyheader FROM mydatabase", "dsn=whatever" response.write rs("myonlyheader") rs.close set rs = nothing What am I doing wrong here?
Record In SQL Server
Any sample code on Insert a record using asp to an SQL server using parameter and Store procedure?
Erase The Record
Hi<br><br>What Is wrong with ny files, ia have put up them here in zip format<br><a href="http://w1.704.telia.com/~u70407040/" target="_blank">w1.704.telia.com/~u70407040/</a><br>designg.asp works fine<br>and it reads in the post I want to edit to desig1.asp<br>but when I click on the button update and goes to design2.asp<br>it erases the record instead of updating it, why is this so
Dynamic Record
I am trying to create a recordset that is dependant on who is logged in. Here is a look at the SQL I have tried with no luck. SELECT * FROM picks WHERE (((picks.PlayerID)={Session.MM_username})); Sorry if this belongs in the sql forum, I wasnt sure as I am using an asp page.
Amend A Record
I am trying to amend a record in my database and it doesnt seem to work here is the code which i am using Code:
|