Click here to Skip to main content
15,921,226 members
Home / Discussions / Database
   

Database

 
AnswerRe: Deleting DataRows Pin
Colin Angus Mackay18-Dec-06 12:57
Colin Angus Mackay18-Dec-06 12:57 
GeneralRe: Deleting DataRows Pin
Paul Conrad18-Dec-06 13:14
professionalPaul Conrad18-Dec-06 13:14 
QuestionTricky question ob querys, how to solve ??? Pin
karam chandrabose18-Dec-06 6:30
karam chandrabose18-Dec-06 6:30 
AnswerRe: Tricky question ob querys, how to solve ??? Pin
Karma3125118-Dec-06 8:17
Karma3125118-Dec-06 8:17 
GeneralRe: Tricky question ob querys, how to solve ??? Pin
Colin Angus Mackay18-Dec-06 12:56
Colin Angus Mackay18-Dec-06 12:56 
AnswerRe: Tricky question ob querys, how to solve ??? Pin
Pete O'Hanlon18-Dec-06 8:45
mvePete O'Hanlon18-Dec-06 8:45 
GeneralRe: Tricky question ob querys, how to solve ??? Pin
karam chandrabose18-Dec-06 17:56
karam chandrabose18-Dec-06 17:56 
QuestionPlease Help me :( Pin
Dayekh18-Dec-06 5:45
Dayekh18-Dec-06 5:45 
Hi,

2 tables. User table and Request Table. Request table has a foriegn key in the Request table called AssignedToID.

I would like to store a Request record without specifying the AssignedToID. I am receiving the following error:

INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_tblRequest_tblUser1'. The conflict occurred in database 'PMSystem', table 'tblUser', column 'inUserID'.

The input for AssignedToID is a Dropdown List. Here's how it is bound:

lst2.Text = "None"<br />
lst2.Value = 0<br />
lst2.Selected = True<br />
<br />
sQueryDDL = "SELECT tblUser.inUserID, tblUser.vchSurname + ', ' + tblUser.vchForename AS AssignedToName FROM tblUser ORDER BY tblUser.vchSurname"<br />
sTableDDL = "tblUser"<br />
dsDDL = clsCommon.getData(sQueryDDL, sTableDDL)<br />
dsDDL.Tables(0).DefaultView.Sort = "AssignedToName"<br />
Me.ddlAssignedToID.DataSource = dsDDL.Tables(0).DefaultView<br />
Me.ddlAssignedToID.DataTextField = "AssignedToName"<br />
Me.ddlAssignedToID.DataValueField = "inUserID"<br />
Me.ddlAssignedToID.DataBind()<br />
Me.ddlAssignedToID.Items.Insert(0, "lst2")


The AssignedToID field is not mandatory and if a user does not select anything, the default value to be stored is 0. The compiler is not liking this. What could be wrong?

Thank you in advance.
AnswerRe: Please Help me :( Pin
Private_Void18-Dec-06 6:06
Private_Void18-Dec-06 6:06 
GeneralRe: Please Help me :( Pin
Dayekh18-Dec-06 22:45
Dayekh18-Dec-06 22:45 
GeneralRe: Please Help me :( Pin
Private_Void19-Dec-06 3:03
Private_Void19-Dec-06 3:03 
GeneralRe: Please Help me :( Pin
Dayekh19-Dec-06 4:56
Dayekh19-Dec-06 4:56 
QuestionReturn cols with values Pin
tadhg8818-Dec-06 1:24
tadhg8818-Dec-06 1:24 
AnswerRe: Return cols with values Pin
ChandraRam18-Dec-06 1:30
ChandraRam18-Dec-06 1:30 
GeneralRe: Return cols with values Pin
tadhg8818-Dec-06 3:48
tadhg8818-Dec-06 3:48 
Questionsqlserver/ msAccess Pin
siva.k18-Dec-06 0:13
siva.k18-Dec-06 0:13 
AnswerRe: sqlserver/ msAccess Pin
Pete O'Hanlon18-Dec-06 0:18
mvePete O'Hanlon18-Dec-06 0:18 
AnswerRe: sqlserver/ msAccess Pin
ChandraRam18-Dec-06 1:28
ChandraRam18-Dec-06 1:28 
Questionhow to declare a variable in sql views Pin
yogita charhate17-Dec-06 22:31
yogita charhate17-Dec-06 22:31 
AnswerRe: how to declare a variable in sql views Pin
Pete O'Hanlon17-Dec-06 22:37
mvePete O'Hanlon17-Dec-06 22:37 
QuestionHelp... database consolidation Pin
shum2317-Dec-06 21:28
shum2317-Dec-06 21:28 
AnswerRe: Help... database consolidation Pin
Colin Angus Mackay17-Dec-06 22:43
Colin Angus Mackay17-Dec-06 22:43 
QuestionTo Get Hierarcal Data Pin
TC2817-Dec-06 19:34
TC2817-Dec-06 19:34 
AnswerRe: To Get Hierarcal Data Pin
Tarakeshwar Reddy17-Dec-06 20:25
professionalTarakeshwar Reddy17-Dec-06 20:25 
QuestionDifferent Table Column in a DataGrid Pin
Tomy140217-Dec-06 17:21
Tomy140217-Dec-06 17:21 

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.