|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SqlConnection component in VB.2005I 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 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 ------------------- Show quoteHide quote "Roman" <[rom***@mbsnetinc.com]> wrote in message news:Oovd0wXEGHA.1476@TK2MSFTNGP10.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 > > 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 Show quoteHide quote "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" <[rom***@mbsnetinc.com]> wrote in message > news:Oovd0wXEGHA.1476@TK2MSFTNGP10.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 > > > > > > > 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 --------------------- Show quoteHide quote "Kerry Moorman" <KerryMoor***@discussions.microsoft.com> wrote in message news:CEA4F2F4-4748-41CB-9472-B3D81D5A90D6@microsoft.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" <[rom***@mbsnetinc.com]> wrote in message >> news:Oovd0wXEGHA.1476@TK2MSFTNGP10.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 >> > >> > >> >> >> 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 Show quoteHide quote "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:%235L2yweEGHA.524@TK2MSFTNGP09.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" <KerryMoor***@discussions.microsoft.com> wrote in message > news:CEA4F2F4-4748-41CB-9472-B3D81D5A90D6@microsoft.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" <[rom***@mbsnetinc.com]> wrote in message >>> news:Oovd0wXEGHA.1476@TK2MSFTNGP10.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 >>> > >>> > >>> >>> >>> > > 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. -- Show quoteHide quoteDennis 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" <[rom***@mbsnetinc.com]> wrote in message > news:Oovd0wXEGHA.1476@TK2MSFTNGP10.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 > > > > > > > Hi,
Yes it will convert fine. They sqlconnection in the system.data.sqlclient 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 -------------- Show quoteHide quote "Dennis" <Den***@discussions.microsoft.com> wrote in message news:6395AFD0-07C1-4882-9C24-7F9F49F66125@microsoft.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" <[rom***@mbsnetinc.com]> wrote in message >> news:Oovd0wXEGHA.1476@TK2MSFTNGP10.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 >> > >> > >> >> >>
Debugging in VS2005 - why is some code shaded grey?
alter built-in ContextMenu Microsoft doesn't want you to use VB .Net Unmanaged C dll call For each ..... next Question XML question Address Matching System WIA.ImageFile to System.Drawing.Image Oggetto Application di excel in vb net 2003 its a pain! |
|||||||||||||||||||||||