Click here to Skip to main content
15,909,325 members
Home / Discussions / Database
   

Database

 
QuestionMS Access & BatchUpdate throw ADO ? Pin
rosen14-Apr-03 3:50
rosen14-Apr-03 3:50 
Generalsearch syntax problem Pin
ylaine14-Apr-03 1:09
ylaine14-Apr-03 1:09 
GeneralDataViewManager, Rowfilters and Child Filtering Pin
xpurt14-Apr-03 0:44
xpurt14-Apr-03 0:44 
GeneralDynamic SQL with in a stored procedure Pin
Venkatraman13-Apr-03 17:56
Venkatraman13-Apr-03 17:56 
GeneralPersonal Sql Server Pin
Steve McLenithan13-Apr-03 9:14
Steve McLenithan13-Apr-03 9:14 
GeneralRe: Personal Sql Server Pin
perlmunger16-Apr-03 6:01
perlmunger16-Apr-03 6:01 
GeneralRe: Personal Sql Server Pin
Steve McLenithan16-Apr-03 6:15
Steve McLenithan16-Apr-03 6:15 
Generalupdating 2 tables containing same value Pin
ylaine11-Apr-03 6:52
ylaine11-Apr-03 6:52 
CREATE PROCEDURE UpdateCompanyProfile
(
@AccNo varchar(50),
@CompanyName varchar(50),
@Address1 varchar(50),
@Address2 varchar(50),
@City varchar(50),
@State varchar(50),
@ZipCode varchar(50)
)
AS
UPDATE tblCompany SET
CompanyName = @CompanyName,
Address1 = @Address1,
Address2 = @Address2,
City = @City,
State = @State,
ZipCode = @ZipCode
WHERE AccountNo = @AccNo
RETURN

my tables are:

tblCompany
---------
CompanyName (primary Key)
AccNo
Address1
Address2
City
State
ZipCode

tblCustomer
-----------
Name
Email
Phone
Job
CompanyName (foreign key)


when i try to update the CompanyName from the site, i get this error message:

UPDATE statement conflicted with COLUMN REFERENCE constraint 'FK_tblCustomer_tblCompany'. The conflict occurred in database 'test', table 'tblCustomer', column 'CompanyName'. The statement has been terminated.

how do i edit the sp above to update the CompanyName column in my customer table as well?

Laine
GeneralRe: updating 2 tables containing same value Pin
Ixpah11-Apr-03 7:04
Ixpah11-Apr-03 7:04 
GeneralRe: updating 2 tables containing same value Pin
Ray Cassick11-Apr-03 8:47
Ray Cassick11-Apr-03 8:47 
GeneralADO.net connect to a remote access database Pin
Crossroad10-Apr-03 9:35
Crossroad10-Apr-03 9:35 
GeneralRe: ADO.net connect to a remote access database Pin
J. Dunlap10-Apr-03 9:49
J. Dunlap10-Apr-03 9:49 
GeneralO/R mapping tools Pin
Avaril9-Apr-03 22:46
Avaril9-Apr-03 22:46 
QuestionCode generator? Pin
Roger Alsing9-Apr-03 22:17
Roger Alsing9-Apr-03 22:17 
AnswerRe: Code generator? Pin
Davy Mitchell9-Apr-03 23:09
Davy Mitchell9-Apr-03 23:09 
GeneralRe: Code generator? Pin
Roger Alsing10-Apr-03 0:01
Roger Alsing10-Apr-03 0:01 
GeneralRe: Code generator? Pin
coge13-Apr-03 12:08
coge13-Apr-03 12:08 
QuestionHOWTO: Insert SQL NULL using ADO Recordset and VC++? Pin
Dan Thurman9-Apr-03 8:52
Dan Thurman9-Apr-03 8:52 
AnswerRe: HOWTO: Insert SQL NULL using ADO Recordset and VC++? Pin
Le centriste11-Apr-03 7:17
Le centriste11-Apr-03 7:17 
GeneralRe: HOWTO: Insert SQL NULL using ADO Recordset and VC++? Pin
Dan Thurman11-Apr-03 8:30
Dan Thurman11-Apr-03 8:30 
GeneralRe: HOWTO: Insert SQL NULL using ADO Recordset and VC++? Pin
Le centriste11-Apr-03 10:37
Le centriste11-Apr-03 10:37 
GeneralAbout the DataSet Pin
DS__9-Apr-03 5:50
DS__9-Apr-03 5:50 
GeneralRe: About the DataSet Pin
Le centriste11-Apr-03 7:19
Le centriste11-Apr-03 7:19 
GeneralCompact and repair ADOX Pin
Hesham Amin8-Apr-03 12:30
Hesham Amin8-Apr-03 12:30 
GeneralADO Error I assume Pin
Toni788-Apr-03 11:20
Toni788-Apr-03 11:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.