Here is my problem :
------------------------------------------------------------------------------------------------------------------------
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim DataContextFilms As New DataContext(MaConnexion)
Dim lesFilms = DataContextFilms.GetTable(Of films)()
Dim dataFilms = From f In lesFilms _
Order By f.id_film Descending _
Where f.id_film = idFilm _
Select f
ShowMe (dataFilms)
end sub
------------------------------------------------------------------------------------------------------------------------
Wich type of variable can I use to create the procedure 'ShowMe' ?
Sub ShowMe (data as ???????????????????)
.......
.......
End Sub
That's perhaps a very simple question, but I am discovering anonymous
type....
------------------------------------------------------------------------------------------------------------------------
ANOTHER QUESTION :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim DataContextFilms As New DataContext(MaConnexion)
Dim lesFilms = DataContextFilms.GetTable(Of films)()
Dim dataFilms = From f In lesFilms _
Order By f.id_film Descending _
Where f.id_film = idFilm _
Select f
Dim MyData = dataFilms.tolist
ShowMe (MyData )
end sub
Wich type can I use to create the procedure 'ShowMe' ?
Sub ShowMe (data as ???????????????????)
.......
.......
End Sub
Thanks for help.
Cor Ligthert[MVP] - 19 Mar 2008 06:12 GMT
Bob,
"Showme" is a method in your code which can contain, printing, showing on
screen or printing or whatever, but is definitely not a variable.
Cor
> Here is my problem :
> ------------------------------------------------------------------------------------------------------------------------
[quoted text clipped - 43 lines]
>
> Thanks for help.
Patrice - 19 Mar 2008 13:35 GMT
Try : IQueryable(Of Films) (Though usually it drops the final s but you may
use a different option than we do here).
This is not an anonymous type. As you select all the fields from the table,
the type is still well know. This is actually type inference (ie. if you
over on Datafilms it should display the dbml generated type).
An anonymous type comes in play when you select a subset of the fields (as
in this case you won't have a type that have those members and only these
one so that compilar will create automatically such a type for you).
C'est pour la fête du cinéma ? ;-)
--
Patrice
> Here is my problem :
> ------------------------------------------------------------------------------------------------------------------------
[quoted text clipped - 43 lines]
>
> Thanks for help.
Bob Develd - 19 Mar 2008 14:54 GMT
C'est pour ma base de données de films !
Thanks for your response!
> Try : IQueryable(Of Films) (Though usually it drops the final s but you
> may use a different option than we do here).
[quoted text clipped - 59 lines]
>>
>> Thanks for help.