cannot insert duplicate key row in msrepl_transactions

We have an issue that our SQL Replication between our Application Server (holding 13 months of data) and our Reporting Server (holding 5-6 years of data).Both systems are running on NT4, SQL Server 7 Ent SP3.Our issue is that we used to run SQL Replication but then stopped using it, and used another ...

attempts to insert duplicate key

I'm using Sybase.ASEOLEDBProvider.2 version 2.7 for all database access-using OLEDB from VC++ and use CDynamicParameterAccessor: CCommand<CDynamicParameterAccessor, CRowset, CMultipleResults> cmdRSThe problem is when the stored proc attempts to insert duplicate key.Till version 2.5 it used to ...

Oracle Could not insert secondary key...

when trying to store a key/data set, tuple bound and with a secondary db, I get this exception:com.sleepycat.je.DatabaseException: Could not insert secondary key in ESetsIndex OperationStatus.KEYEXISTat com.sleepycat.je.SecondaryDatabase.insertKey(SecondaryDatabase.java:679)at com.sleepycat.je.Secon ...

Oracle Triggers to insert primary key

I have two tables in database namely CM_BOM and CM_BOM_ITEM. The table columns are as follows :In CM_BOM tableCR_ID CR_BOM_CODECR_BOM_NAMECR_FG_CODECR_ID is primary keyTrigger to insert primary key data is as follows : CREATE OR REPLACE TRIGGER COSTMAN."CM_BOM_T1"BEFORE INSERT ON "CM_BOM"FOR EACH RO ...

Oracle how to insert the key which have the many data

hi,everyBody,I have a question,i want to insert the key which hava different data, how to do it, which method can help me to do it. THX.such as ,i want to insert the key: aaa , but it has many data.the data: 1,2,3,4,5,6,7,..... 。that is all,thang you. ...

Ubuntu Insert foreign key in XAMPP

I am using xampp for web development, my database in mysql, I go that datebase using 'phpmyadnin'. Now i want to insert 'foreign key' in my databse using phpmyadmin. ...

Violation of PRIMARY KEY constraint 'PK_client'. Cannot insert duplicate key in objec

sir i have problem related to entity framwork 4.0 when i insert data into client table then it show below error plz help me sirViolation of PRIMARY KEY constraint 'PK_client'. Cannot insert duplicate key in object 'dbo.client'.The statement has been terminated.Description: An unhandled exception occ ...

Insert by key or sequence? What's the default "insert" feature?

I tried to insert large pool of data from table A to table B. Table B is then exported to Excel for viewing purpose. However, i found that some of the rows are not inserted in order, they seemed to be inserted in between other rows that are inserted before them. May I know what is the problem? There ...

insert primary key into foreign key

I'm trying to alter my dreamweaver insert page code so that it takes the auto-incremented primary key number and inserts it into a second table as a foreign key so I can link the tables. Im using the "LAST_INSERT_ID" though I understand there is a similar bit of php. At the moment it keeps ...

problem using session to insert foreign key

pls somebody help me with this,i am trying to use a session to insert in to the database a user_id of a user who is posting a topic in to the topic table to act as a foreign key in the topic table. but i kept getting 0 in the user_id column instead of the real userid below is my code.<?php requir ...

Insert new key into array within while loop

all. Just starting playing with PHP and have hit a snag.I want to create an array with some details from a mysql DB. While creating the array I want to calculate the persons age (called from another function) and insert that returned result as a new key called 'age' ... but I can't get it to work.My ...

Ubuntu unable to insert private key file.

yesterday I tried to connect to my university wifi network.I'm working on intrepid. I was able to connect flawlessly on previous versions of ubuntu...Now when I try to insert my private key file, the network manager let me browse for *.pem files only, and not for *.key, which is what I need...The ne ...

Ubuntu How to insert ASCII key in Wicd?

I managed to connect to my accesspoint trough command but now I wan't to use somehting simples, Wicd in this case, but I can't find a way to insert an ASCII key, when I connect it won't get past "Obtaining IP adress". ...

insert/select key statement help

For MS SQL 2005.i am inserting first and last name into a table. The auto incrementing keyID (key) gets generated after the insertion. Now I need this keyID, but dont want to use a select statement. Can this key be retrieved somehow in the insert statement and if not, what is the proper way to reach ...

insert primary key

I'm creating a php script that can create a table on a selected database. I finally got it right. But when I enter the code which allows a field to be the primary key, my code doesn't work. Here is my code:<?phpinclude ("db_con.php");echo '<form action="table_add.php" metho ...

insert primary key column

I am trying to add a new column into a table that is a copy of another table. it then needs to become the primary key of the new table and also make it an auto number, is this possible? the SQL code i already have in the query for copying the data to the different table is shown below:SELECT * INTO ...

How-to Question: combo box, insert primary key

I have a MySQL DB with several tables, linked by standard PK/FK relationships.This is an interactive DB to which users quite regularly add records through forms.When a record is added, I want to store the key, rather than the value, in the new record (to preserve the PK/FK structure.)So, I would lik ...

Oracle Insert Duplicate Key/Value Combination

Since Berkeley DB does not support inserting duplicate key/value combinations even if the database allows duplicates, is there any way to allow this by changing the Berkeley DB source code? If so, which class should I look at?Is there an easier and efficient trick that you can think of that can allo ...

problem to insert a key field in another table

everybody I have this case which I couldn't solve and need badly your helptable1id1 field1 field21 a b2 a ctable2id1 field1 field2a ba cI need to update table2 on the (id1) if the value of field1 and field2 in table 1 is equal to field1 and field2 in table 2 and inserting null when there is no match ...

Violation of Primary constraint cannot insert duplicate key in object in SQLY2K DTS

I continue to get this message though there are no duplicate keys in thetable/s I am transferring into the new table I am creating using DTS. Icreated a query to look to duplicate primary keys and did not get anyduplicates after running it. The DTS is a copy and has been modified (anothertable has b ...

Insert Registry Key

I'm mfc-newbie.My problem is, that I don't know how to add a registry value into Loacal_Machine/...../Run/MyValuewith SetRegKey, CreateRegKey, etc...Cause I need to init my app at system startup ...

Insert unknown key into array

If I have an array obtained by a mysql query with a WHERE clause how do I get it to return 0 where there is no match?For example:Table contains:Name: Age: Job:John 21 CashierAdam 15 BaggerSusie 42 ManagerJill 19 CashierMark 36 ManagerMy Query is this:$query = "SELECT job, COUNT(*) FROM table WH ...

Primary Key Error

I am making one client server application in which at server side I made tables using this codeDatabase db = server.Databases["dbo"];nonqueryCommand.CommandText = "CREATE TABLE UserInfo (ID varchar(50),LoginName varchar(50),Date varchar(50),Time varchar(50) CONSTRAINT PKid PRIMARY KEY ...

want to insert info but running into errors about PK

ok guys as you probably have noticed I am new to coldfusion and running into all kinds of fun problems. I have a form that fills out a DB and later an approver has the ability to change the pk in case they need two of the same requests they can change the pk to one number difference but is there a w ...

Primary key violation after replication

We recently replicated a database using merge replication. There is only one subscriber. After the replication had run for about a week we started receiving the following error message any time that we tried to insert a record into the table. (Violation of PRIMARY KEY constraint 'PK__MaterialUsed__6 ...

Trapping Primary Key violation in Transact SQL

Is it possible to trap Primary key, foreign key violations using transact SQL?Notice that I am not able to trap it:begininsert into testtuan values ('asdsd')if @@error <>0beginprint 'print error message'end end The above code never goes to print error message, but instead goes to something lik ...

Transaction Replication Primary Key Error

We had a replication running great in production, but we never had a developemental one. So we decide to create an developemental replication mimic the production servers. We have 4 merge publication and 2 transational publication. All works great except one transactional publication, and it's givin ...

Violation of PRIMARY KEY

I am having a a problem with a very simple quiz form. For some reason after inserting 2 answers the following error is received: Microsoft VBScript runtime error '800a000d' Type mismatch: 'LBound' After receiving this error, if you try to go back and enter answers you get the following:Microsoft OLE ...

PRIMARY KEY constraint problem

I have an odd problem on something that used to work fine.I have an SP that inserts a record into a table (Contract) with two keyed fields.The keys are as follows:ContractID and SeqID (Sequence)These two keys make the records unique. Ex:ContractID SeqID12345 112345 212345 3etc....Several weeks of us ...

primary key problem

In table A I have 3 fields making up the primary keyID CodeDatein this table there are many records having the same ID I need to change the ID in all the records with certain IDsFor example ID 12345 needs to be changed to 54321 in all records with an ID of 12345I am using a table B to link old IDs w ...

Primary Key Conflict with Merge Replication

I created a C# WinForms application which uses merge replication and MSDE to sync up laptops with a central SQL Server 2000 database. The primary keys have always been set to "Not for Replication", but after experiencing data conflicts when syncing I set all foreign keys to "Not for R ...

How do you find a primary key violation

I need to find out which record I am violating by trying to execute this stored procedureALTER PROCEDURE InsertCorovan2004 AS INSERT INTO [GamingCommissiondb].[dbo].[Corovan_Table] ([TM #], [FirstName], [LastName], [SS #], [TerminationDate], [Voluntary or Involuntary]) SELECT [TM #], FirstName, Last ...

Violation of PRIMARY KEY constraint

I know what this error means is that you can not insert duplicate primary keys in the table but the thing is I am checking the rows if they do not exist then insert otherwise don't do any thing these are the lines I am writing in my strored procedure can someone please let me know what I am doing wr ...

Violation of PRIMARY KEY constraint

When I try to insert data into a table (let's just call it MyTable for this post), I suddenly get the following error.Violation of PRIMARY KEY constraint 'PK_MyTable'. Cannot insert duplicate key in object 'MyTable'.My table does have a primary key field named 'id', which is an auto-incrementing BIG ...

Primary Key Violation Error in SQL 2005

I've recently migrated a SQL 2000 db to SQL 2005. There is a table with a defined primary key. In 2000 when I try importing a duplicate record my application would continue and just skip the duplicates. In 2005 I get an error message "Cannot insert duplicate key row in object ... with unique in ...

Violation of PRIMARY KEY constraint error

We are using web application, our server log this type error. some can help me out how to slove this type of error4/16/2007 2:44:26 PM DECIMonitoring.DocTracking.Db:insertState [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint 'idx_edcstate_p_cl_01'. Cannot in ...

how to insert row from select row

i have table A which has the column b as auto increment number, and other column c, d, eI want to insert one row from the row in exact same table but change the clumn b which is auto increment numberI did like this:insert into A select c, d, e from A where b =xxxxerror is: due to key violation, I do ...

Cannot save View - Primary Key being duplicated

Encountering a problem with one of our project repositories (oldest and largest one). They cannot save Views. New views create fine, produce correct listing of requirements, but when they try to save it (or click Yes to Save changes when existing the project) they get the following: Violation of PRI ...

How sort key in Skiped list Max to Min

This code is SkipList sort Min to Max. How to convert this SkipList to sort Max to Min.??File : SkipList.java/**Skip ListUsing integer key*/import static java.lang.Math.*;public class SkipList {private static final double PROB = 0.5D;private static final int MAX_VALUE = Integer.MAX_VALUE;private sta ...

Can't INSERT/UPDATE with MSSQL

I'm currently running PHP 4.0.6 and freeTDS 5.1 on a Red Hat Linux system (6.1) I am accessing a Microsoft SQL 7.0pl1 server. I can do all kinds of selects against the server with no problems. When I try to do an insert/update it does not work.Here is the code I am testing with:<BODY><?$CID ...

Want Help "How can i use numeric key instead of alphabetic in text box "

i have calculator project when i insert numeric key i work properly.But when i insert a,b,c,d, etc. it give me error and application stop.send me code how can i stop writing alphabetic key in text box.only use numeric ...

Ubuntu strange USB key behavior

I have a 2gb usb key. It is acting strange. I have added some files in the Jaunty system I run as a desktop (seperate system) and when I insert that key into my laptop, also Jaunty the directories are appearing with little lock symbols on them and I am unable to write to the key. What has happened h ...

Oracle ORA 28234 - key length too short

I have been trying to implement dbms_crypto on XE beta 2 running on windows xp pro.when i generate a 128 bit key usingdbms_crypto.randombytes (128)and then insert that key into my insert statement i getORA 28234 - key length too shorti am using the following function to encrypt dateCREATE OR REPLACE ...

Ubuntu dd command on an active USB key ?

To avoid having both Vista and Ubuntu sharing my internal hard drive I installed lucid on a 16 Go USB key. Now, I would like to take an iso image of the key as a backup to reinstall on a new key in case I lose the first one.I believe the appropriate command to do this is dd (or dcfldd) but I am not ...

Oracle Key sorting

I insert some key, value pair into db. Key is "0", "1", "2", ..... but when I query these value, it returns me no correct order. I wonder how can I sort the key? ...

Violation of primary key issue

Can anyone tell me ???.why i am getting the following issue ???. Violation of PRIMARY KEY constraint 'PK_CNK_dailysales'. Cannot insert duplicate key in object 'CNK_dailysales'.here is the following code what i have writtenPublic Sub InsertDailySales(rs As ADODB.Recordset)Dim con As ADODB.Connection ...

Ubuntu network key

I have to insert network key every time I log on. Can it be made to remember key ...

doing ordered insert in an array

i have an array that holds integer values. The integer are never repeating and as I insert the data in this array (through insert method that accepts the integer), I want to keep the array in ascending order.the header of method looks like this:public void insert (int key)for example, if an array (o ...

help with a sproc (update/insert)

Can someone help shed some light on why this sproc isn't working:CREATE PROCEDURE [dbo].[SaveUser]@ID int,@UserName varchar(50),@Password varchar(50),@EmailAddress varchar(50)ASBEGINIF EXISTS (SELECT * FROM [user] WHERE [id] = @ID)BEGINUPDATE [user]SET [username] = @UserName,[password] = @Password,[ ...

howto insert new rows

HiI'm a real newbie to SQL, so this might seem very basic. I searched for a solution here already and found thread 342246 as the most similar question, but which didn't work for me.I try to do some update/insert work for a user table. If I find a unique user alias, I do an update, else I have to ins ...