I have a client application made in visual basic which connects to sql database and retrives the data. Now i want to create a dll of one of the public fuctions i have used in that application. The function uses the recordset to retrive itemcode. annd the function is passed with barcode. Now since in the vb application i have written the code to connectthe datbase first i need not write it again in the class module. No i want to use the same connection object which i have created in my application for my dll to use to retrive the record.