Hi,
I keep getting an error when I try to insert a new record into a table (SQL
2000) that has a column that I've configured as 'Unique Null Allowed'. I
used Visual Studio (2003) IDE SQL Data Adapter Wizard to create the stored
procedures, data adapter, and dataset using a simple select statement with
one paramater. Everything works fine except the 'Unique Null Allowed' column
requires a value on Insert or I get an error. What am I doing wrong? 4 1766
Make the column an identity column.
"Rich" wrote: Hi,
I keep getting an error when I try to insert a new record into a table (SQL 2000) that has a column that I've configured as 'Unique Null Allowed'. I used Visual Studio (2003) IDE SQL Data Adapter Wizard to create the stored procedures, data adapter, and dataset using a simple select statement with one paramater. Everything works fine except the 'Unique Null Allowed' column requires a value on Insert or I get an error. What am I doing wrong?
Thanks for responding; I'm unable to change the column to an 'identity'
because two other columns are set as the primary key.
"carion1" wrote: Make the column an identity column.
"Rich" wrote:
Hi,
I keep getting an error when I try to insert a new record into a table (SQL 2000) that has a column that I've configured as 'Unique Null Allowed'. I used Visual Studio (2003) IDE SQL Data Adapter Wizard to create the stored procedures, data adapter, and dataset using a simple select statement with one paramater. Everything works fine except the 'Unique Null Allowed' column requires a value on Insert or I get an error. What am I doing wrong?
Add an insert trigger to increment the value.
"Rich" wrote: Thanks for responding; I'm unable to change the column to an 'identity' because two other columns are set as the primary key.
"carion1" wrote:
Make the column an identity column.
"Rich" wrote:
Hi,
I keep getting an error when I try to insert a new record into a table (SQL 2000) that has a column that I've configured as 'Unique Null Allowed'. I used Visual Studio (2003) IDE SQL Data Adapter Wizard to create the stored procedures, data adapter, and dataset using a simple select statement with one paramater. Everything works fine except the 'Unique Null Allowed' column requires a value on Insert or I get an error. What am I doing wrong?
The value does not belong to me; it is user supplied.
"carion1" wrote: Add an insert trigger to increment the value.
"Rich" wrote:
Thanks for responding; I'm unable to change the column to an 'identity' because two other columns are set as the primary key.
"carion1" wrote:
Make the column an identity column.
"Rich" wrote:
> Hi, > > I keep getting an error when I try to insert a new record into a table (SQL > 2000) that has a column that I've configured as 'Unique Null Allowed'. I > used Visual Studio (2003) IDE SQL Data Adapter Wizard to create the stored > procedures, data adapter, and dataset using a simple select statement with > one paramater. Everything works fine except the 'Unique Null Allowed' column > requires a value on Insert or I get an error. What am I doing wrong? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Randell D. |
last post by:
Folks,
I use PHP to write my form data to MySQL.
I have a database with about ten tables. I'm trying to fill one table with
some dummy data (its a contact manager table holding names of...
|
by: Suzanne |
last post by:
Hi All
I'm having problems getting my data adapter to throw a concurrency
exception with an INSERT command. I want to throw a concurrency
exception if an attempt is made to enter a row into...
|
by: florian |
last post by:
Hi,
we have a contention problem because of an application which tries to
insert a duplicate row in a table with primary key. This insert fails
of course but the locks are not released within...
|
by: Larry Johnson |
last post by:
I have two similar SQL Server databases each with a table named
Payments. PaymentID is an identity field and the primary, unique, key
in both tables. There is one other key but it is not unique.
...
|
by: trint |
last post by:
This:
string strSQL2 = "INSERT INTO tblTravelDetailMember(memberId, " +
" TravelDetailUplineId, " +
" rankId, " +
" TravelDetailId, " +
" CreatedDateTime, " +
" Operator) " +
"VALUES ('" +...
|
by: D. Dante Lorenso |
last post by:
I'm trying to build a table that will store a history of records
by enumerating the records. I want the newest record to always
be number ZERO, so I created a trigger on my table to handle the...
|
by: Tom Allison |
last post by:
I seemed to remember being able to do this but I can't find the docs.
Can I run a sql query to insert new or update existing rows in one query?
Otherwise I have to run a select query to see if...
|
by: Bob Alston |
last post by:
I have a routine to copy data to new versions of my app via insert into
sql statements. Unfortunately, due to evolution of my app, sometimes
the new version has more restrictive editing than an...
|
by: Mangler |
last post by:
Can someone point me in the right direction on this? There are 3
fields in the DB: model, rma, bagqty. If the values on a certain row
are I530, 1108, 50 and a user goes to input the same data I...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |