Click here to Skip to main content
15,887,135 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Ip Camera in VB6 Pin
Member 1140477027-Jan-15 19:51
Member 1140477027-Jan-15 19:51 
AnswerRe: Ip Camera in VB6 Pin
mohaibje30-Apr-19 1:01
mohaibje30-Apr-19 1:01 
Questionfacebook chat Pin
tavi1723-Jan-15 0:31
tavi1723-Jan-15 0:31 
AnswerRe: facebook chat Pin
Eddy Vluggen23-Jan-15 11:06
professionalEddy Vluggen23-Jan-15 11:06 
GeneralRe: facebook chat Pin
tavi1723-Jan-15 22:32
tavi1723-Jan-15 22:32 
GeneralRe: facebook chat Pin
Eddy Vluggen26-Jan-15 5:27
professionalEddy Vluggen26-Jan-15 5:27 
AnswerRe: facebook chat Pin
Richard MacCutchan23-Jan-15 22:43
mveRichard MacCutchan23-Jan-15 22:43 
QuestionProblems passing an entity as argument Pin
dilkonika22-Jan-15 12:05
dilkonika22-Jan-15 12:05 
Hello !
I have this code :
Public Class myclass
....
Private cont As MyentEntities
.....
.....

Public Sub New( ByRef cnx As MyentEntities)
   .....
    cont = cnx
    .....
End Sub

Public Sub test
.....

If cont.mytable1.Count=1 then

.....
end if 

End Sub
End class



And on my main form :
.......
Dim E1 as MyEntEntities
Dim m1 as myclass
Private Sub MainForm_Load(sender As System.Object, e As System.EventArgs)    
Handles Me.Load 

E1=New MyentEntities
m1=new MyClass(E1)
........

End Sub

Private sub fill_entity

E1.MyTable1.Tolist
....
End sub

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs)    
Handles Button1.Click

m1.test

End Sub



When I click the button , I get an error :

....the entity of type 'MyTable1' does not exist in the context.

But this entity type is added to E1.

What's wrong ?

Thank you !
AnswerRe: Problems passing an entity as argument Pin
Eddy Vluggen23-Jan-15 11:12
professionalEddy Vluggen23-Jan-15 11:12 
QuestionByref or Byval : which is faster and consume less memory Pin
dilkonika22-Jan-15 10:12
dilkonika22-Jan-15 10:12 
AnswerRe: Byref or Byval : which is faster and consume less memory Pin
PIEBALDconsult22-Jan-15 10:23
mvePIEBALDconsult22-Jan-15 10:23 
QuestionRe: Byref or Byval : which is faster and consume less memory Pin
ZurdoDev22-Jan-15 10:34
professionalZurdoDev22-Jan-15 10:34 
AnswerRe: Byref or Byval : which is faster and consume less memory Pin
PIEBALDconsult22-Jan-15 10:38
mvePIEBALDconsult22-Jan-15 10:38 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
dilkonika22-Jan-15 10:49
dilkonika22-Jan-15 10:49 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
PIEBALDconsult22-Jan-15 10:52
mvePIEBALDconsult22-Jan-15 10:52 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
dilkonika22-Jan-15 10:59
dilkonika22-Jan-15 10:59 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
PIEBALDconsult22-Jan-15 11:08
mvePIEBALDconsult22-Jan-15 11:08 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
dilkonika22-Jan-15 11:15
dilkonika22-Jan-15 11:15 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
Dave Kreskowiak22-Jan-15 17:06
mveDave Kreskowiak22-Jan-15 17:06 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
ZurdoDev22-Jan-15 11:18
professionalZurdoDev22-Jan-15 11:18 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
PIEBALDconsult22-Jan-15 11:21
mvePIEBALDconsult22-Jan-15 11:21 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
dilkonika22-Jan-15 11:23
dilkonika22-Jan-15 11:23 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
PIEBALDconsult22-Jan-15 11:41
mvePIEBALDconsult22-Jan-15 11:41 
AnswerRe: Byref or Byval : which is faster and consume less memory Pin
ZurdoDev22-Jan-15 13:36
professionalZurdoDev22-Jan-15 13:36 
GeneralRe: Byref or Byval : which is faster and consume less memory Pin
dbitsch22-Jan-15 15:34
dbitsch22-Jan-15 15:34 

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.