Click here to Skip to main content
15,889,335 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: DATAGRID OF VB.NET 2003 AND 2005 Pin
Hansduncan23-Apr-07 10:18
Hansduncan23-Apr-07 10:18 
GeneralRe: DATAGRID OF VB.NET 2003 AND 2005 Pin
klaydze23-Apr-07 18:53
klaydze23-Apr-07 18:53 
Questionusercontrol move messages Pin
lee2322-Apr-07 16:04
lee2322-Apr-07 16:04 
AnswerRe: usercontrol move messages Pin
Dave Kreskowiak23-Apr-07 4:01
mveDave Kreskowiak23-Apr-07 4:01 
QuestionCalendar control dates Pin
Spontrel22-Apr-07 14:43
Spontrel22-Apr-07 14:43 
AnswerRe: Calendar control dates Pin
kubben22-Apr-07 15:02
kubben22-Apr-07 15:02 
GeneralRe: Calendar control dates Pin
Spontrel22-Apr-07 15:34
Spontrel22-Apr-07 15:34 
QuestionNeeds to show database information in listbox via SELECT statement over more tables Pin
keninfo22-Apr-07 9:55
keninfo22-Apr-07 9:55 
Hello all,

I have three tables:

Tablename 1: Agent
Collums:
Agentnumber (PK)
Agentname

Tablename 2: Agent_Group
Collums:
Agentnumber (FK, connection with Agentnumber of Agent table)
Groupnumber (FK, connection with Groupnumber of group table)

Tablename 3: Group
Collumns:
Groupnumber (PK)
Groupname

Now i need to show the names of the agents which belong to (for example) groupnumber 300.

This is the SELCECT statement i made:

SELECT Agent.Agentname
FROM (Agent_Group INNER JOIN
Agent ON Agent_Group.Agentnumber = Agent.Agentnumber)
WHERE (Agent_Groep.Groupsnumber = ?)

The "?" is a variable, called groupNumber.

Wen run the statement in the querybuilder i get some results bun when running the application i get the error message:

"An unhandled exception of type 'System.Data.ConstraintException' occurred in system.data.dll"

Maybee som extra info (in dutch):

Additional information: Beperkingen konden niet worden ingeschakeld. Een of meer rijen bevatten waarden die in strijd zijn met de beperkingen met betrekking tot niet-null waarden, unieke waarden of afwijkende sleutels.

The following statement works fine but then i see only the agentnumbers who belong to group 300.

SELECT Agentnummer, Groepsnummer
FROM Agent_Groep
WHERE (Groepsnummer = ?)

Somebody any idea?

Thanks

AnswerRe: Needs to show database information in listbox via SELECT statement over more tables Pin
Dave Kreskowiak23-Apr-07 7:27
mveDave Kreskowiak23-Apr-07 7:27 
QuestionRead MS Access Table to Text file Pin
IvanIT22-Apr-07 7:19
IvanIT22-Apr-07 7:19 
AnswerRe: Read MS Access Table to Text file Pin
_mubashir22-Apr-07 9:16
_mubashir22-Apr-07 9:16 
GeneralRe: Read MS Access Table to Text file Pin
IvanIT23-Apr-07 6:35
IvanIT23-Apr-07 6:35 
GeneralRe: Read MS Access Table to Text file Pin
Dave Kreskowiak23-Apr-07 6:55
mveDave Kreskowiak23-Apr-07 6:55 
GeneralRe: Read MS Access Table to Text file Pin
IvanIT23-Apr-07 14:56
IvanIT23-Apr-07 14:56 
QuestionMinimize form Pin
eagertolearn22-Apr-07 7:17
eagertolearn22-Apr-07 7:17 
AnswerRe: Minimize form Pin
kubben22-Apr-07 9:06
kubben22-Apr-07 9:06 
GeneralRe: Minimize form Pin
eagertolearn23-Apr-07 6:03
eagertolearn23-Apr-07 6:03 
QuestionHow To compare data in array A and array B Pin
somchoto22-Apr-07 2:43
somchoto22-Apr-07 2:43 
AnswerRe: How To compare data in array A and array B Pin
Arun.Immanuel22-Apr-07 4:29
Arun.Immanuel22-Apr-07 4:29 
GeneralRe: How To compare data in array A and array B Pin
somchoto22-Apr-07 5:05
somchoto22-Apr-07 5:05 
QuestionPlease help me in Crystal report Pin
pnrad22-Apr-07 0:59
pnrad22-Apr-07 0:59 
AnswerRe: Please help me in Crystal report Pin
klaydze22-Apr-07 19:42
klaydze22-Apr-07 19:42 
QuestionText Color Pin
Anybloodyid22-Apr-07 0:04
Anybloodyid22-Apr-07 0:04 
AnswerRe: Text Color Pin
Christian Graus22-Apr-07 0:22
protectorChristian Graus22-Apr-07 0:22 
QuestionHow to use a variable value in a SELECT statement Pin
keninfo21-Apr-07 23:46
keninfo21-Apr-07 23:46 

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.