function - Refering to Database Error -


I'm new to Visual Basic so please forgive me already I'm trying to refer to the data table from a module And I get a reference, a shared member does not need an object. Error. I can not understand why.

Lotto_rows.Count lotto = Int ((counter-1 + 1) * Rnd () + 1) Dim nameq = Database11DataSet.Tbl_names.AsEnumerable in n () where n.ID = lotto select n for each n Nameq first = n.first next lotto = Int ((counter - 1 + 1) * rnd () + 1)

one ?? | This is the same as for the previous name

  full name return function    

As you have said, your problems were on the lines that were used:

  Database11DataSet.Tbl_names   

Within, Database11DataSet appears to be of a type rather than an object; The only methods can be said in a way that is shared (or, depending on language, stable):

Static methods neither require a frequency of class nor They can enter into an example of such an example (or it, self, me, etc.).

In your case, you should be able to solve it by making an example of . Database 11 dataset at the top of your code, and then being used in that type of place:

  public function get_name () ... new databases as data 11 datasets () counter = data. Tl_names.Rows.Count lotto = Int ((counter-1 + 1) * Rnd () + 1) Dim nameq = From data to n Tl_names.AsEnumerable () where n.ID = lotto select n ... End Function    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -