Solved

VB6 update SQL Server

Posted on 2009-05-20
2
211 Views
Last Modified: 2012-05-07
Processing an update statement is causing a Duplicate Key error inserting.... ?  Primary key error.  The primary key isn't a column being updated??
Update subscriptions set PRODUCT_CODE = 'ONLINE_LIB' , 
BT_ID = '100521' , 
PROD_TYPE = 'SUB' , 
STATUS = 'A' , 
BEGIN_DATE = '10/1/2008' , PAID_THRU = '9/30/2009' , COPIES = 1 , SOURCE_CODE = '' , FIRST_SUBSCRIBED = '12/31/1899' , CONTINUOUS_SINCE = '10/1/2008' , PRIOR_YEARS = 0 , FUTURE_COPIES = 0 , FUTURE_COPIES_DATE = '12/31/1899' , PREF_MAIL = 0 , PREF_BILL = 0 , RENEW_MONTHS = '0' , MAIL_CODE = '' , PREVIOUS_BALANCE = 0 , BILL_DATE = '10/2/2008' , REMINDER_DATE = '12/31/1899' , REMINDER_COUNT = '0' , BILL_BEGIN = '10/1/2008' , BILL_THRU = '9/30/2009' , BILL_AMOUNT = 300 , BILL_COPIES = 1 , PAYMENT_AMOUNT = 300 , PAYMENT_DATE = '10/2/2008' , PAID_BEGIN = '12/31/1899' , LAST_PAID_THRU = '9/30/2009' , COPIES_PAID = 1 , ADJUSTMENT_AMOUNT = 0 , LTD_PAYMENTS = 300 , ISSUES_PRINTED = '' , BALANCE = 0 , CANCEL_REASON = '' , YEARS_ACTIVE_STRING = '' , LAST_ISSUE = '' , LAST_ISSUE_DATE = '12/31/1899' , DATE_ADDED = '10/2/2008' , LAST_UPDATED = '10/3/2008 11:09:50 AM' , UPDATED_BY = 'KTRINH' , INTENT_TO_EDIT = '' , F
LAG = '' , BILL_TYPE = 'A' , COMPLIMENTARY = 0 , FUTURE_CREDITS = 0 , INVOICE_REFERENCE_NUM = 0 , INVOICE_LINE_NUM = 0 , CAMPAIGN_CODE = '' , APPEAL_CODE = '' , ORG_CODE = 'MCLE' , IS_FR_ITEM = 0 , FAIR_MARKET_VALUE = 0 Where  id = '100521'

Open in new window

0
Comment
Question by:Jeff_Kingston
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 250 total points
ID: 24432007
Hello Jeff_Kingston,

Are you updating a column that has a unique index, for which your update would introduce a duplicate value?

Regards,

Patrick
0
 

Author Comment

by:Jeff_Kingston
ID: 24432114
You ever been in the forest where you can't see the trees.  there was a field in the updatestring that was a primary key,that I completely forgot about.  Wouldn't it be nice if there error trapping contined the offending row???
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Viewers will learn how the fundamental information of how to create a table.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question