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:
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?
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.
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.
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?
I have a SP on a page and its working fine, well it works. For some reason it looks like its getting executed twice and on the first time it inserts the default values and the second it inserts the correct values in the DB. Is it because i have another insert statment on the page? Im not sure what you need to be able to help/suggest something for me. Let me know what you may need.
I'm currently tring to insert data into an access db using asp. I have a form which is found in a popup window and which contains the fields Name and Comment. When I click on the Submit button,I call a javascript function in order to redirect the user to the page that will save the name and comment.
However,I am having an error like this:Field 'VoicesComment.Name' cannot be a zero-length string. The problem is that the value from the previous page in the popup window is not retrieved. I have tried retrieving the name entered and the page does not return anything. The code for the page that is supposed to save data is as follows: Code:
When I submit the Application form, various records are inserted into 10 different tables. The master table is taking the correct ID number, but the rest of the tables are showing "0" as the ID. Can anyone throw a light on what could be going wrong ?
A page I'm working on contains a registration form which is supposed to a) update an Access database using ASP and b) email the contents of the submitted form to the camp administrator.
This is my first experience with ASP, and with any kind of database interfacing language, for that matter. Currently I'm struggling with the record insertion. I'll worry about email afterwards.
I'm using Dreamweaver 8, which is generating all the code for me. I have a testing server set up on my local machine (in my working directory, in fact). I've told DW to connect to the databse (located in %siteroot%/database) through the testing server using a DSN (same DSN as on the web server). Code:
i have a access DB, and a asp page to add the records to the database, i work on visual interdev, i get error when i run the code as:
ADODB.Recordset (0x800A0CB3) object.provider is not compatible of performing requested operation. /project/addprocess.asp, line 37 'points to rs.addnew line
I have a very simple Access database with these fields:
ID | Team | Score
I want a user to enter the new score of the team into a form and then it's updated. All pretty straighforward - except I'm getting an error at the bottom of this page:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
I'm trying to create a piece of code that randomly selects a record from a database (providing the record has not already been chosen for any of the previous 4 sections). Here is my code:
I have a booking form, called classroomform. On this form the user requests a classroom number, location, date, start/end time and number of students.
As it stands, the data is submitted via a submit button and an insert query created using Dreamweaver.
I already have various validation on the form, such as javascript which error checks for invalid times etc and asp validation which checks for correct dates etc.
However, the final touch that I'm looking to do is to add some code to the form which checks for duplicate entries that are in the database. I basically want an error check which doesn't allow the user to enter a duplicate record that is based on classroom number, location, date, start/end time.
Code: SELECT * From Product WHERE CatId = 14 AND CatSubId = 13 AND CatSubSubId = 9 Now if i change this query to either of the below it reults in an error as nothing is puled from the database. Now if i run this query directly in Access, these 2 execute fine:
Code: SELECT Size From Product WHERE CatId = 14 AND CatSubId = 13 AND CatSubSubId = 9 Or to
Code: SELECT Distinct Size From Product WHERE CatId = 14 AND CatSubId = 13 AND CatSubSubId = 9 Size is a number (long integer) field.
Err.Number is -2147467259 Err.Description is blank. no description Err.HelpContext is 5003251
I have increased the script time out and command time out time and still the same thing.
I am using a Replace function to replace single quotes with double when submitting a text field in the database i.e. Replace (q, "'", "' ' ") which works fine. When I retrieve the field from the database which has apostrophe I am getting 'Object expected' error message. Is there a way to fix this?
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 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 ?
i have a database Access with Book Table and Author Table. now i have created a form which inserts info submitted into the Book Table, yet it keeps giving me this error "You cannot add or change a record because a related record is required in table 'Author' " while the names of the authors are all registered.
it works in Access but not in asp it doesn't make much sense. People just enter the names of the books which their authors are in the Author table. it keeps giving me error. how to know why this is so?
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)
I'm using ASP + MS SQL. I wrote a simple insert into command but nothing is happening... it gave no error and no information is stored in the db. When I response.write my SQL, I got the following:
INSERT INTO [blog_entries](title,user,entry,date) VALUES('test','admin','test','Tuesday, December 25, 2007')
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