As you mentioned, your problems were on the lines that used:
Database11DataSet.Tbl_names
Within your code, Database11DataSet
appears to be a type rather than an object; the only methods that can be called on a type are shared (or, depending upon the language, static). From http://en.wikipedia.org/wiki/Method_(computer_programming)#Static_methods:
Static methods neither require an instance of the class nor can they implicitly access the data (or this, self, Me, etc.) of such an instance. A static method is distinguished in some programming languages with the static keyword placed somewhere in the method's signature.
In your case, you should be able to resolve this by creating an instance of Database11DataSet
at the top of your code, and then using that in place of the type:
Public Function get_name()
...
Dim data as new Database11DataSet()
counter = data.Tbl_names.Rows.Count
lotto = Int((counter - 1 + 1) * Rnd() + 1)
Dim nameq = From n In data.Tbl_names.AsEnumerable()
Where n.ID = lotto
Select n
...
End Function