HighTechTalks DotNet Forums  

Connection string design-time editor

Dotnet Framework (WinForms DesignTime) microsoft.public.dotnet.framework.windowsforms.designtime


Discuss Connection string design-time editor in the Dotnet Framework (WinForms DesignTime) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ahmed Hashish
 
Posts: n/a

Default Connection string design-time editor - 09-23-2007 , 05:07 AM






Dear Sir
I'd like to create a user control that has a connection string property that allows the user to setup a connection at design time in the same fashion as in Project settings or TableAdapters.

When a someone adds this control to their form, there will be a property called ConnectionString that when it is clicked (via the Properties grid), it will bring up the Connection Properties dialog box.

I tried the following code:
namespace UserControls

{

public partial class UserControl1 : UserControl

{

public UserControl1()

{

InitializeComponent();

}



private string _connectionstring;



[RefreshProperties(RefreshProperties.All), RecommendedAsConfigurable(true), DefaultValue(""), Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlCo nnectionStringEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]

public string Connectionstring

{

get { return _connectionstring; }

set { _connectionstring = value; }

}

}

}



but the Editor used allow to build SQL connections only, Is there other Editors help building other databases connections.



Ahmed Hashish




Reply With Quote
  #2  
Old   
Ahmed Hashish
 
Posts: n/a

Default Re: Connection string design-time editor - 09-23-2007 , 05:54 AM






I found IT

Editor("Microsoft.VSDesigner.Data.ADO.Design.OleDb ConnectionStringEditor,Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")



thanks

"Ahmed Hashish" <a_hashish (AT) hotmail (DOT) com> wrote

Dear Sir
I'd like to create a user control that has a connection string property that allows the user to setup a connection at design time in the same fashion as in Project settings or TableAdapters.

When a someone adds this control to their form, there will be a property called ConnectionString that when it is clicked (via the Properties grid), it will bring up the Connection Properties dialog box.

I tried the following code:
namespace UserControls

{

public partial class UserControl1 : UserControl

{

public UserControl1()

{

InitializeComponent();

}



private string _connectionstring;



[RefreshProperties(RefreshProperties.All), RecommendedAsConfigurable(true), DefaultValue(""), Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlCo nnectionStringEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]

public string Connectionstring

{

get { return _connectionstring; }

set { _connectionstring = value; }

}

}

}



but the Editor used allow to build SQL connections only, Is there other Editors help building other databases connections.



Ahmed Hashish




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.