473,756 Members | 3,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SqlConnection component in VB.2005

Hello

I have a component built in VB.2003. It has the following property:

Public Shared mCONN As SqlConnection
Public Property Connection() As SqlConnection
Get
Return mCONN
End Get
Set(ByVal value As SqlConnection)
mCONN = value
End Set
End Property

In VB.2003 there was a SqlConnection component. Once confugured it would
automatically show in my custom component under Connection property.

VB.2005 does not have SqlConnection component and my Connection property is
always empty. Is there a way to get around this limitation in vs.2005?

Thanks in advance,
Roman
Jan 4 '06 #1
9 4198
Hi,

The SqlConnection was replaced with table adapters in VB 2005. Maybe
you can extend a tableadapter to suite your needs.

http://msdn2.microsoft.com/en-us/library/ms233697.aspx

Ken
-------------------
"Roman" <[ro****@mbsnetin c.com]> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
Hello

I have a component built in VB.2003. It has the following property:

Public Shared mCONN As SqlConnection
Public Property Connection() As SqlConnection
Get
Return mCONN
End Get
Set(ByVal value As SqlConnection)
mCONN = value
End Set
End Property

In VB.2003 there was a SqlConnection component. Once confugured it would
automatically show in my custom component under Connection property.

VB.2005 does not have SqlConnection component and my Connection property
is
always empty. Is there a way to get around this limitation in vs.2005?

Thanks in advance,
Roman

Jan 5 '06 #2
Yuck!

Do you know why Microsoft would release a new version of a language and not
make it backward compatible?

IMO, it actions like these that make it hard for developers to move forward.
New versions of languages should be merely enhancements and bug fixes. To
take major sections out of a language like the SqlConnection is madness.
Developers that have developed large applications in 2003 will have to make
code changes, and potentially, pattern changes in order for their
applications to work in 2005! I know this my opinion, but here's another
one ... Yuck! I am sticking to 2003 until Microsoft decide to fix the nasty
bugs 2005 and start putting their feet firmly on the ground and start
implementing backward compatibility.

L.

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:eC******** *****@TK2MSFTNG P12.phx.gbl...
Hi,

The SqlConnection was replaced with table adapters in VB 2005.
Maybe you can extend a tableadapter to suite your needs.

http://msdn2.microsoft.com/en-us/library/ms233697.aspx

Ken
-------------------
"Roman" <[ro****@mbsnetin c.com]> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
Hello

I have a component built in VB.2003. It has the following property:

Public Shared mCONN As SqlConnection
Public Property Connection() As SqlConnection
Get
Return mCONN
End Get
Set(ByVal value As SqlConnection)
mCONN = value
End Set
End Property

In VB.2003 there was a SqlConnection component. Once confugured it would
automatically show in my custom component under Connection property.

VB.2005 does not have SqlConnection component and my Connection property
is
always empty. Is there a way to get around this limitation in vs.2005?

Thanks in advance,
Roman


Jan 5 '06 #3
I was under the impression that you could start a vb.net 2003 solution under
vb.net 2005 and it would convert seamlessly. This is apparently not the case
since SqlConnection is not supported in VB.Net 2005.
--
Dennis in Houston
"Ken Tucker [MVP]" wrote:
Hi,

The SqlConnection was replaced with table adapters in VB 2005. Maybe
you can extend a tableadapter to suite your needs.

http://msdn2.microsoft.com/en-us/library/ms233697.aspx

Ken
-------------------
"Roman" <[ro****@mbsnetin c.com]> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
Hello

I have a component built in VB.2003. It has the following property:

Public Shared mCONN As SqlConnection
Public Property Connection() As SqlConnection
Get
Return mCONN
End Get
Set(ByVal value As SqlConnection)
mCONN = value
End Set
End Property

In VB.2003 there was a SqlConnection component. Once confugured it would
automatically show in my custom component under Connection property.

VB.2005 does not have SqlConnection component and my Connection property
is
always empty. Is there a way to get around this limitation in vs.2005?

Thanks in advance,
Roman


Jan 5 '06 #4
Ken,

I haven't used VS2005 yet, but I'm virtually certain that there is still a
SQLConnection object as part of ADO.Net 2.0.

Perhaps you mean that there is no longer some visual designer
component/wizard that represents a SQLConnection? But I'm sure you can still
dimension a variable as a new SQLConnection.

Kerry Moorman
"Ken Tucker [MVP]" wrote:
Hi,

The SqlConnection was replaced with table adapters in VB 2005. Maybe
you can extend a tableadapter to suite your needs.

http://msdn2.microsoft.com/en-us/library/ms233697.aspx

Ken
-------------------
"Roman" <[ro****@mbsnetin c.com]> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
Hello

I have a component built in VB.2003. It has the following property:

Public Shared mCONN As SqlConnection
Public Property Connection() As SqlConnection
Get
Return mCONN
End Get
Set(ByVal value As SqlConnection)
mCONN = value
End Set
End Property

In VB.2003 there was a SqlConnection component. Once confugured it would
automatically show in my custom component under Connection property.

VB.2005 does not have SqlConnection component and my Connection property
is
always empty. Is there a way to get around this limitation in vs.2005?

Thanks in advance,
Roman


Jan 5 '06 #5
guys,
even i've not used vs2005 but i've just checked this thing out and
found that IT IS STILL THERE. all you neeed to do is, goto add item and
add the components on your toolbox. bydefault you wont find then on the
toolbox. and aslo the GUI support is there so you stil can adjust
params through GUI.
Lucky

Jan 5 '06 #6
by the way i forgot to mention that i'm using VS2005 Beta 2. i dont
know which version of VS 2005 you have. but in Beta 2 release it it
there

Jan 5 '06 #7
Hi,

Yes it will convert fine. They sqlconnection in the
system.data.sql client namespace and the sqlconnection component in the
toolbox are still there. The component for connecting to data in the ide
is the tableadapter. The new model is much better.

http://msdn2.microsoft.com/en-us/library/bz9tthwx.aspx

Ken
--------------
"Dennis" <De****@discuss ions.microsoft. com> wrote in message
news:63******** *************** ***********@mic rosoft.com...
I was under the impression that you could start a vb.net 2003 solution
under
vb.net 2005 and it would convert seamlessly. This is apparently not the
case
since SqlConnection is not supported in VB.Net 2005.
--
Dennis in Houston
"Ken Tucker [MVP]" wrote:
Hi,

The SqlConnection was replaced with table adapters in VB 2005.
Maybe
you can extend a tableadapter to suite your needs.

http://msdn2.microsoft.com/en-us/library/ms233697.aspx

Ken
-------------------
"Roman" <[ro****@mbsnetin c.com]> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
> Hello
>
> I have a component built in VB.2003. It has the following property:
>
> Public Shared mCONN As SqlConnection
> Public Property Connection() As SqlConnection
> Get
> Return mCONN
> End Get
> Set(ByVal value As SqlConnection)
> mCONN = value
> End Set
> End Property
>
> In VB.2003 there was a SqlConnection component. Once confugured it
> would
> automatically show in my custom component under Connection property.
>
> VB.2005 does not have SqlConnection component and my Connection
> property
> is
> always empty. Is there a way to get around this limitation in vs.2005?
>
> Thanks in advance,
> Roman
>
>


Jan 5 '06 #8
Hi,

You are right they are still there. My thought was he should try
and use the new data binding model in the ide rather than expect the user of
his control to add additional components to the toolbox.

Ken
---------------------
"Kerry Moorman" <Ke**********@d iscussions.micr osoft.com> wrote in message
news:CE******** *************** ***********@mic rosoft.com...
Ken,

I haven't used VS2005 yet, but I'm virtually certain that there is still a
SQLConnection object as part of ADO.Net 2.0.

Perhaps you mean that there is no longer some visual designer
component/wizard that represents a SQLConnection? But I'm sure you can
still
dimension a variable as a new SQLConnection.

Kerry Moorman
"Ken Tucker [MVP]" wrote:
Hi,

The SqlConnection was replaced with table adapters in VB 2005.
Maybe
you can extend a tableadapter to suite your needs.

http://msdn2.microsoft.com/en-us/library/ms233697.aspx

Ken
-------------------
"Roman" <[ro****@mbsnetin c.com]> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
> Hello
>
> I have a component built in VB.2003. It has the following property:
>
> Public Shared mCONN As SqlConnection
> Public Property Connection() As SqlConnection
> Get
> Return mCONN
> End Get
> Set(ByVal value As SqlConnection)
> mCONN = value
> End Set
> End Property
>
> In VB.2003 there was a SqlConnection component. Once confugured it
> would
> automatically show in my custom component under Connection property.
>
> VB.2005 does not have SqlConnection component and my Connection
> property
> is
> always empty. Is there a way to get around this limitation in vs.2005?
>
> Thanks in advance,
> Roman
>
>


Jan 5 '06 #9
Hi guys

Thanks for all your suggestions.
I will definitely try the new data access features available in vb.2005.
But that will require recoding many parts of my component which was
compelete and ready for use in vb.2003. Just to save time I will manually
add
the SqlConnection to my toolbox. I never knew it was still there!

Thanks again
Roman

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** *******@TK2MSFT NGP09.phx.gbl.. .
Hi,

You are right they are still there. My thought was he should try
and use the new data binding model in the ide rather than expect the user
of his control to add additional components to the toolbox.

Ken
---------------------
"Kerry Moorman" <Ke**********@d iscussions.micr osoft.com> wrote in message
news:CE******** *************** ***********@mic rosoft.com...
Ken,

I haven't used VS2005 yet, but I'm virtually certain that there is still
a
SQLConnection object as part of ADO.Net 2.0.

Perhaps you mean that there is no longer some visual designer
component/wizard that represents a SQLConnection? But I'm sure you can
still
dimension a variable as a new SQLConnection.

Kerry Moorman
"Ken Tucker [MVP]" wrote:
Hi,

The SqlConnection was replaced with table adapters in VB 2005.
Maybe
you can extend a tableadapter to suite your needs.

http://msdn2.microsoft.com/en-us/library/ms233697.aspx

Ken
-------------------
"Roman" <[ro****@mbsnetin c.com]> wrote in message
news:Oo******** ******@TK2MSFTN GP10.phx.gbl...
> Hello
>
> I have a component built in VB.2003. It has the following property:
>
> Public Shared mCONN As SqlConnection
> Public Property Connection() As SqlConnection
> Get
> Return mCONN
> End Get
> Set(ByVal value As SqlConnection)
> mCONN = value
> End Set
> End Property
>
> In VB.2003 there was a SqlConnection component. Once confugured it
> would
> automatically show in my custom component under Connection property.
>
> VB.2005 does not have SqlConnection component and my Connection
> property
> is
> always empty. Is there a way to get around this limitation in vs.2005?
>
> Thanks in advance,
> Roman
>
>


Jan 5 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2064
by: Sam Sungshik Kong | last post by:
Hello! A disposable object's Dispose() method can be called either explicitly by the programmer or implicitly during finalization. If you call Dispose, the unmanaged resources are released earlier. Thus, if you think the unmanaged resources are important, you call Dispose explicitly. My question is what's the criteria to decide the unmanaged resources are important.
17
9391
by: LP | last post by:
Hello, Here's the scenario: Object A opens a Sql Db connection to execute number of SqlCommands. Then it needs to pass this connection to a constructor of object B which in turn executes more commands on the same connection. I have an understanding that if SqlConnection is passed as "value" (unboxed), object B will create its own copy of SqlConnection, so when object A closes its connection, it remains open for object B's copy. Is this
2
7796
by: Carlos | last post by:
I would like to create a component that inherits from sqlconnection, but it is sealed. What ancestor can I inherit from? I've seen this: public sealed class SqlConnection : Component, IDbConnection, ICloneable So, I've tried:
8
2850
by: Rolf Gossen | last post by:
Hello NG, sometimes I read: "Never store an SqlClient.SqlConnection in a Session Variable." But noone explains why. Is there anyone who can briefly summarize the main problems about this approach. Thanks in advance Rolf
1
1151
by: Maileen | last post by:
Hi, Is the SQLConnection component only for SQL Server (from MS) or can we use it for MySQL and PostgreSQL too ? Because when i use the OdbcConnection component, and try to debug my application, i have a "database connection was disabled" message after a long timeout...and i do not know what did generate this long time out. thanks a lot,
1
1288
by: Michael Lang | last post by:
I have a class deriving from System.ComponentModel.Component. In VS 2003 I could drag it on to a web form. However I'm finding in VS 2005 whilst it functions perfectly at runtime. At design time in VS.NET 2005 you can not drag the component on to a web form. When I select customize toolbox and select my dll containing the component I can see the component listed and checked. After clicking OK the component is not actually available...
1
1145
by: jleraj | last post by:
Thanks Guys for the posting Dt.5th Jan. regarding the sqlconnection object in vs2005. I was also clueless about it, but after seeing the articles posted, I am also able to find the sqlconnection object. Thanks for all Edward
5
3430
by: fniles | last post by:
I am using VB.NET 2003. When using SQLClient.SQLConnection with SQL 2005 database, 1. connection pooling is automatically used, right ? I mean, in the connection string I do not need to explicitly write Pooling=true ? 2. What is the default Max Pool size ? After I open the connection, how can I check what is the max pool size ? 3. I always open the db right before I fill dataset or open a reader, then close it right away, but sometimes I...
2
3127
by: alberthung01 | last post by:
Hi all, I wrote a component with ComponentDesigner to let users drag and drop it to WebPage from toolbox directly. Just like the behavior of dataAdapter. But it works fine on ASP.NET 1.1 but not on ASP.NET 2.0. Sometimes I add it to toolbox in VS2005 WebSite Project but it will not appear. And always it can't be drag and drop to WebPage any more. Nothing will be added to page after that.
0
9456
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10034
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9843
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9713
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.