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?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Inserting Record
I am trying to insert a record into an access database, to just one table, using an insert form created from dreamweaver.However when i open the page, enter the details and click submit, it re-directs me back to the same page, rather than the confirm one. The weird thing is, i created an identical page for to insert a record into another table in same database and it works fine. There is also a problem when trying to update/delete a record from the same table.
Inserting New Record
I'm trying to create a form on an ASP web page which will contain information on students and I'm working in Macromedia Dreamweaver MX. When the user wants to insert a new record and when he opens the web page to do so the form should automatically show a new Incident Report Number. When inserting a new record For example: If the last record that was entered had an Incident No 13, the form must show number 14 by itself for the Incident Number field and the user should be able to enter the rest of the information of the student.
Error Inserting New Record
I am receiving the following error when attempting to insert a new record into my database Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again. The code below works 1st time through, but on the 2nd invocation (with TOTALLY different data), I get the above error message. My database is an Access 2003 database, and everything else works fine ! Also, if I'm really trying to write a duplicate record, why doesn't it fall into my duplicate trap? Code:
INSERTing Or UPDATEing A Record
got a form which I want to commit to the database on submit. I have collected the data in the form controls and when they push submit I want it to insert the data to the database. Whats the best way to do this??? Should I call another page and do the work there or do it in the same window. If I do it from another page whats the best way to do this?
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 ?
ASP Inserting (')
There i seem to be having a problem when inserting certain characters into my access database using a form, mainly (') characters.
Inserting Into
I get the following error message Microsoft VBScript compilation error '800a03ee' Expected ')' /weblinkup/chat.asp, line 1775 oConn.Execute("INSERT into chat (username,nametext,roomname,type,priv,thetime,msg) VALUES ('" & username & "', '" & username & "', '" & Roomname & "', 'msg', '0', '" & now() & "', '" & username & " has just said " & emotetarget & "." ')") what the problem is with the code?
Bulk Inserting
I have an error as follows: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC SQL Server Driver][SQL Server]Could not bulk insert. File 'c:mydata.csv' does not exist. My mydata.csv file is inside the directory i stated. But why does the server complains that the file is not fould? My codings: strSQL = "BULK INSERT NAME FROM 'c:mydata.csv' WITH (FIELDTERMINATOR = ',',ROWTERMINATOR = ' ')" Response.Write ("test") Set oRS = conn.Execute(strSQL)
Inserting Database
I had some Error when i write the update sqlp query Error Type: Microsoft VBScript compilation (0x800A0401) Expected end of statement /fyp/Quiz/updateQuiz.asp, line 21, column 77 SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")" Code: SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")"
Inserting Data
I'm wondering if it's possible to create an instance of an ADO Recordset and add values to it by ASP ?? Ex : I have 2 arrays : arr1 = Array(1,"allo") arr2 = Array(2,"bonjour") Is it possible to add these 2 arrays into a Recordset to manipulate de data more easily? If yes, could you provide me with a little example to see the synthax, because I tried almost everything and it didn't worked at all
Inserting Smilies
how do i design my site interface such that users can insert smilies along with text in the form field just like it is here on sitepoint...
Inserting Apostrophes Into DB?
When I insert info into a DB from a form, it cuts the string off at the first apostrophe ("). How would I make it insert the data as-is, with the apostrophes? Here is the code used to insert the Data:
Inserting And Downloading
I am developing web pages , therein doing database connectivity using ASP with Microsoft Access.I want to insert a file (.opt/.pmopt) into a field 'OLE Object'. Also I want to display that file name in tabular form and a link to download that file.
Before Inserting Data
I am trying to make a web-based front-end for one of our programs. I'm running into a problem. Here's a sample of one of our tables: Code: CaseNo ChargeCount ArrestCharge FiledCharge 123 1 13 13 123 2 14 14 199 1 03 03 The ChageCount column cannot have nulls and must be unique. is there a way when I'm adding a new charge, i can check to see if a chargecount exists? For example, if inserting a new record, it will first check if there is a chargecount, if there is not, it will make it 1. if there is a charge count, it will +1 to the existing chargecount
Inserting Characters
Im doing a update page and noticed this error, whenever you want to write for example "can't, i've" it errors on submit, but characters like "." are okay. Why doesn't it like these characters and how can i make it like them? I need some extra code?
Inserting Into A Database
I have the folllowing page where a user can add a review to the website. So far the page works fine, but on the review rating section I know that the rating is between 0 - 5. But its posible for a user to enter 1000 if they wished, which still means the page works but the answer is too high. Also if they write text in the field it errors the page. How do i code this so that they can only enter a number between 0 and 5 and only a number and not text.
Inserting Link
I want to make a button just like here (when posting new thread) to insert hyperlink into text. For example when user is typing text into textarea I would like to have also a button that can enable users to post different links to other intenet pages. And I would also like to have button that makes the text bold (Actually those are buttons that appear on most forums when posting a new thread)
Problem In Inserting
I got a webpage in which I am cheking various checkbox values.Actually the problem that I am facing is that,I am not able to insert the contents in to the database. But no error is coming.What I am doing is that,when the user submits the form,using a retrun querystring,i am storing all the checked values in to an array.I am able to print this array with correct output.But whn i am trying to insert in to the database,it is not getting inserted.
Inserting Into A Table
I'm having problems inserting into a table in an oracle database. I am reading in variables from a ASP form and trying to enter these into the database. however only numbers will insert, even though I can print out the string variables on the ASP page. IF I inclose a string value in the insert statement it works ok so there is nothing wrong with my SQL code. Code:
Inserting A Zero In A Table
I am right now calculating distance between 2 zip codes and storing them in a table along with extra information like a persons name and address and stuff like that. For some reason for distance "0" ..doesnt get inserted in my table..? What do i need to do in my code so that "0" distance + information gets in the table since i need that info to be displayed later for people to make calls to those people with 0 distances.
Inserting New Records To DB
I have created an online database for a school project, and everything WAS going fine until today. I created the add record page and for some reason, whenever i try to add the records to the database THIS error message comes up: Code:
Inserting Into A Databse
I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but that has problems.
Inserting A Date
I have a form that I submit to an oracle database. Along with the info from the form I want to insert the date it was submitted. How should I go about doing this? I am having problems because it is the wrong format? I am using a 'date' data type for the field. How can I convert the date into the correct format that will allow me to submit it, I have tried using to_char or to_date, but they give me an error?I tried using this to convert it, but it doesn't work, I am getting a syntax error?submit_date=to_date(date,'YYYY-MM-DD')
Inserting Records
what the best way to update a ms access database from an asp page is.I have a db with 3 different tables,these tables are bound to each other via the relationships. On my asp page,I want to create one page where the user would enter in information and hit submit.The problem I have though is that how do I have only one button that will update information from 3 or more tables all at once?
Inserting Character
How do I insert a space after every 4th character in a string?I'm presuming I somehow use the replace function?
Inserting NULL Value
How to do subj ?I tried: date1=NULL strSQL = "INSERT t (mydate) VALUES("&date1&")" i tried with ' ' and without, tried "''", i tried allmost all variations &because i cant put NULL, i have error in my main strSQL.
Inserting Date
i m reading data from a excel file and inserting its fields into access database, everything is fine but i m getting problem when i m insertin the data string into the date/time field of the aceess database,i have use the CDate function but it is not working.what should i do?
Inserting Asp To Other Page
is there a way to run an ASP script from an html page?the script is obviously written on an ASP page elsewhere but I want it run from HTML or SHTML.so they dont figure out the URL of my ASP page.
Inserting Text
I have encountered a problem when a user submits text which contains commas and quotation marks. Code: Function ChkString(string) If string = "" Then string = " " ChkString = Replace(string, "'", "''") End Function I am currently using the above code, but what i have realised is that i am losing whole text that does not get entered into the database, when i wrap commas and quotes around it.
Inserting XML Elements
I am aware of how to create elements, attributes on the fly with the Microsoft.XMLDOM however I was wondering if anyone had any examples of how you could extend this to insert the content created in to an existing node. Eg <root> <section> <- INSERT ELEMENT HERE -> </section </root>
Inserting More Than One Records
I am working on a project, and now I am experiencing a problem to insert multiple records at a time. My form is designed so that a user can insert multiple input (in several text fields). What is the best strategy to handle this? the number of fields are created randomly (I will use innerHTML in Javascript to present text field randomly on my form). I have tried to use google using the following keyword: "inserting multiple records using ASP", but the result page did not satisfy me.
Inserting Into Database
I have a problem with inserting the results of which radio button was selected into a database. I have the code for the text fields down with no problems. I guess my question is how to populate the yes/no fields in the access database.
Inserting Image
How do i insert images into a database? Can anyone recommend a tutorial or website ?
Inserting New Field.
How can I insert a new field in a MS Access database table. I've already got the following but I can't get it to work with a default value. Quote: ALTER TABLE Articles ADD 'Moderated' number How do I add a default value?
Inserting In Table
my database is access and i'm trying to insert data from a form into the table's fields in the same order they are written in the form without explicitly having to mention the fields' names. e.g. (this is the prototype of what i want to do) for x=1 to request.form.count()-1 insert into table1(fields(x)) values (request.form.item(x)) execute the sql next does anyone have an idea of the right syntax for this?
Inserting Records
although it seems that the database is updated the data doesn't pass to the table...Just the autonumber is increasing in the database without insering the records (the other records remain blank...like submitting nothing).. Code:
Inserting From A Form...
I am currently trying to build a web app using ASP and MySQl DB. am reading books, surfing the web and reusing other peoples code to get what i want done done Code:
Inserting Table
I'm trying to insert a table to format a list of options on a dynamic page using VBscript. The page currently displays the links in a list when the user chooses one from the drop down menu. I would like the links to be in three columns, rather than the default vertical list.
INSERTING DATE
I am trying to insert a date into a date field through my website. The date is pre-populated with todays date. I am getting a type mismatch error. The Access DB is setup as a Date/Time Short Date field. Code:
Inserting 2 Different ASP Statements Into One ASP File
I have two ASP statements (<% , %>) that I would like to insert into one ASP file. One of the statements is already inserted in the file and works successfully. However, when I insert the second ASP statement, the page comes up with an error;- "Microsoft VBScript compilation error '800a0411' Name redefined " I am pretty sure I get this error because both statements are conflicting with one another. I also can't combine the two statements as I use a DSN connection for one, and a DSN-less connection for another and I connect to 2 different databases. How might I be able to include both ASP statements within the single ASP file? A user on another Forum said " there is a variable DIMmed twice. easiest way is a third include with the variable names in. That way it can be used with any combination of the includes."
Inserting Dates Into MS-Access?
This seems like it should be easy but I am stumped. I am trying take a variable, add to it, and insert the result as a new record into Access. The ending result is: ....
Inserting Binary Files.
How can I insert a binary file into a SQL Server db using asp? It must be possible cause SQL Server has a datatype called "varbinary".
Inserting Date As Null
i found a different way to insert the date or rather not insert the date at all if a certain condition is true. But anyway i have come accross the same problem when i try to update the date field with a blank value. Code:
Inserting Multiple Records
Im having a hared time with this, im trying to update multiple records in a database from a form. The form display all records from a search query and then the user selects whether to post the record of put the record on hold (two fields in the database). Now everywhere I have looked I only see examples which update the records by using counts but I could end up with any number of records. I thought that using a loop would be an idea to get passed this.
|