Linq to SQL and UNION SELECT

  • Thread starter Thread starter bpsdgnews
  • Start date Start date
B

bpsdgnews

Hi,

This code


Dim TrainingOmschrijvingen As New TrainingOmschrijvingenDataContext
Dim TrainingOmschrijvingLijst = From tblTrainingen In
TrainingOmschrijvingen.tblTrainingens _
Select
tblTrainingen.Omschrijving _
.Union(From tblTrainingplan In
TrainingOmschrijvingen.tblTrainingplans _
Select
tblTrainingplan.Omschrijving)

cboOmschrijving.DataSource = TrainingOmschrijvingLijst


Results in this error:

Sequence operators not supported for type 'System.String'

Can anyone tell me how to solve this?
 
bpsdgnews said:
Hi,

This code


Dim TrainingOmschrijvingen As New TrainingOmschrijvingenDataContext
Dim TrainingOmschrijvingLijst = From tblTrainingen In
TrainingOmschrijvingen.tblTrainingens _
Select
tblTrainingen.Omschrijving _
.Union(From tblTrainingplan In
TrainingOmschrijvingen.tblTrainingplans _
Select
tblTrainingplan.Omschrijving)

cboOmschrijving.DataSource = TrainingOmschrijvingLijst


Results in this error:

Sequence operators not supported for type 'System.String'

Can anyone tell me how to solve this?

For examples of UNION from MS try:

http://msdn.microsoft.com/en-us/vbasic/bb688088.aspx

LS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top