UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Inheriting Sqlconnection In Vb.net    
 
   
ngulube
post Jan 9 2012, 11:28 AM
Post #1

UtterAccess Enthusiast
Posts: 91



Is there a way to inherit the "SqlConnection" object ? The code I have written as below generates the error "Inherits System.Data.SqlClient.SqlConnection"

==========The sample Code ================
Module ConnectivityFlexibility
Public Class ConClass
Inherits System.Data.SqlClient.SqlConnection
End Class
End Module
======================================
"Thanks in advance!
Go to the top of the page
 
+
datAdrenaline
post Jan 9 2012, 02:03 PM
Post #2

UtterAccess Editor
Posts: 16,705
From: Northern Virginia, USA



Since the SqlConnection class can not be inherited, the direct answer to your question is "no".

However, you could pass in an SqlConnection object in your classes' constructor, then you have access to the SqlConnection class through your class and a property.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 30th July 2014 - 12:10 PM