No you can't insert data into categories.groupid UNLESS that value that you
are inserting is in group.groupid.

For example:

+Group table
++Groupid       ++group
1               fruits
2               veges
3               meats
4               breads

+categories table
++groupid       ++categoryid    ++category
1               1                       berries
1               2                       all others
5               3                       cooking oils
5               4                       butter

Those last two entries into the categories table are invalid because there
is no group with an id of 5.  The fats/sugars group was never added to the
group table so you can't start adding categories yet.

HTH,
--K             

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 10:11 AM
To: [EMAIL PROTECTED]
Subject: RE: MS Access CFUPDATE question



I am not quite clear what you are recommending. Do you mean that I can't
insert data in a column Categories.GroupID  of table Categories if that
Column is tied to Group.GroupID in table Group by using CFUPDATE.

Sorry if I come across stupid...

Thanks,

Nehal
-----Original Message-----
From: Shawn Regan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 12:34 PM
To: '[EMAIL PROTECTED]'
Subject: RE: MS Access CFUPDATE question


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C01820.3D0E0070
Content-Type: text/plain;
        charset="iso-8859-1"

You have a relationship with that table, that requires you to have a record
in it that is related with the table your updating.

Shawn Regan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 9:20 AM
To: [EMAIL PROTECTED]
Subject: RE: MS Access CFUPDATE question


Anyone have an idea why the following error occurs when I use two tables in
MS Access that have one-to-many relationship with referencial integrity
applied. I am trying to update a record in Categories table which has one
column called GroupID.  The GroupID comes from Table called Group. I have
established one-to-many relationship between Group -to- Categories. I have
turned off the lookup column (combo box) option and changed it to text box.
I still get this error.



Error Diagnostic Information
ODBC Error Code = 23000 (Integrity constraint violation)


[Microsoft][ODBC Microsoft Access Driver] You cannot add or change a record
because a related record is required in table 'Group'.



The error occurred while processing an element with a general identifier of
(CFUPDATE), occupying document position (6:2) to (6:124).

Any suggestions are very welcome

Thanks,

Nehal


----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------_=_NextPart_001_01C01820.3D0E0070
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: MS Access CFUPDATE question</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>You have a relationship with that table, that =
requires you to have a record in it that is related with the table your =
updating.</FONT></P>

<P><FONT SIZE=3D2>Shawn Regan</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: [EMAIL PROTECTED] [<A =
HREF=3D"mailto:[EMAIL PROTECTED]">mailto:fleming@forteinterac=
tive.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, September 06, 2000 9:20 AM</FONT>
<BR><FONT SIZE=3D2>To: [EMAIL PROTECTED]</FONT>
<BR><FONT SIZE=3D2>Subject: RE: MS Access CFUPDATE question</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Anyone have an idea why the following error occurs =
when I use two tables in</FONT>
<BR><FONT SIZE=3D2>MS Access that have one-to-many relationship with =
referencial integrity</FONT>
<BR><FONT SIZE=3D2>applied. I am trying to update a record in =
Categories table which has one</FONT>
<BR><FONT SIZE=3D2>column called GroupID.&nbsp; The GroupID comes from =
Table called Group. I have</FONT>
<BR><FONT SIZE=3D2>established one-to-many relationship between Group =
-to- Categories. I have</FONT>
<BR><FONT SIZE=3D2>turned off the lookup column (combo box) option and =
changed it to text box.</FONT>
<BR><FONT SIZE=3D2>I still get this error.</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>Error Diagnostic Information</FONT>
<BR><FONT SIZE=3D2>ODBC Error Code =3D 23000 (Integrity constraint =
violation)</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>[Microsoft][ODBC Microsoft Access Driver] You cannot =
add or change a record</FONT>
<BR><FONT SIZE=3D2>because a related record is required in table =
'Group'.</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>The error occurred while processing an element with a =
general identifier of</FONT>
<BR><FONT SIZE=3D2>(CFUPDATE), occupying document position (6:2) to =
(6:124).</FONT>
</P>

<P><FONT SIZE=3D2>Any suggestions are very welcome</FONT>
</P>

<P><FONT SIZE=3D2>Thanks,</FONT>
</P>

<P><FONT SIZE=3D2>Nehal</FONT>
</P>
<BR>

<P><FONT =
SIZE=3D2>---------------------------------------------------------------=
-------------</FONT>
<BR><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Archives: <A =
HREF=3D"http://www.mail-archive.com/[email protected]/" =
TARGET=3D"_blank">http://www.mail-archive.com/[email protected]/=
</A></FONT>
<BR><FONT SIZE=3D2>To Unsubscribe visit</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dli=
sts/cf_talk" =
TARGET=3D"_blank">http://www.houseoffusion.com/index.cfm?sidebar=3Dlists=
&body=3Dlists/cf_talk</A> or</FONT>
<BR><FONT SIZE=3D2>send a message to [EMAIL PROTECTED] =
with 'unsubscribe' in</FONT>
<BR><FONT SIZE=3D2>the body.</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=
-------------</FONT>
<BR><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Archives: <A =
HREF=3D"http://www.mail-archive.com/[email protected]/" =
TARGET=3D"_blank">http://www.mail-archive.com/[email protected]/=
</A></FONT>
<BR><FONT SIZE=3D2>To Unsubscribe visit</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dli=
sts/cf_talk" =
TARGET=3D"_blank">http://www.houseoffusion.com/index.cfm?sidebar=3Dlists=
&body=3Dlists/cf_talk</A> or</FONT>
<BR><FONT SIZE=3D2>send a message to [EMAIL PROTECTED] =
with 'unsubscribe' in</FONT>
<BR><FONT SIZE=3D2>the body.</FONT>
</P>

<P><FONT =
SIZE=3D2>---------------------------------------------------------------=
---------------</FONT>
<BR><FONT SIZE=3D2>Archives: <A =
HREF=3D"http://www.mail-archive.com/[email protected]/" =
TARGET=3D"_blank">http://www.mail-archive.com/[email protected]/=
</A></FONT>
<BR><FONT SIZE=3D2>To Unsubscribe visit <A =
HREF=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&body=3Dli=
sts/cf_talk" =
TARGET=3D"_blank">http://www.houseoffusion.com/index.cfm?sidebar=3Dlists=
&body=3Dlists/cf_talk</A> or send a message to =
[EMAIL PROTECTED] with 'unsubscribe' in the =
body.</FONT></P>

</BODY>
</HTML>
------_=_NextPart_001_01C01820.3D0E0070--
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to