Hi peeps. Im trying to use my dbConnect() function in a public class. I am getting the following compiliation error: "Reference to a non-shared member requires an object reference."<BR><BR>The function works fine outside of the class.<BR><BR>Any help would be much appreciated.<BR><BR>[code language="language"]<BR>Public Class ConstClass<BR><BR> &#039; Returns an open database connection object<BR> Public Shared Function dbConnect(ByVal UDLFile As String)<BR> Dim dbconn As OleDbConnection<BR> dbconn = New OleDbConnection("Password = NeoGeo1988; File Name = " & server.mappath(UDLFile))<BR> dbconn.Open<BR> dbConnect = dbconn<BR> End Function<BR>End Class<BR>[/code]