X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Inheriting Sqlconnection In Vb.net    
post Jan 9 2012, 11:28 AM

Posts: 92
Joined: 18-May 04

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
post Jan 9 2012, 02:03 PM

UtterAccess Editor
Posts: 17,955
Joined: 4-December 03
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

Custom Search
RSSSearch   Top   Lo-Fi    21st May 2018 - 02:05 AM