DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 11 Jul 2007 10:02:01 -0700,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    B. Chernick
          2    William \(Bill\) Vaughn
                 3    B. Chernick


Question about automatic connection string settings using VS2005   
I feel like I'm forgetting something.  Assume Visual Studio 2005 (VB) and 
assume you have created a data source and dataset by the usual means.   
Assume multiple tables.  

Now you have a designer.vb module associated with the dataset containing an 
InitConnection sub for each table, as well as an ominous message at the top 
of the file warning against manual change.  (For simplicity's sake also 
assume that you chose the option not to create an Application Setting 
connection string.) 

Given this, is there any one place in the dataset I could programmatically 
set the connection string, or must I always do it for each individual table 
adapter, whenever one is instantiated?
Date:Wed, 11 Jul 2007 10:02:01 -0700   Author:  

Re: Question about automatic connection string settings using VS2005   
I would leverage the settings value created by the Data Source config wizard. 

Dim cn As New SqlClient.SqlConnection

cn.ConnectionString = My.Settings.CustomerConnectionString

hth
-- 
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-------------------------------------------------------------------------"B. Chernick"  wrote in message news:7A251269-4947-4FEA-A596-CC0043BC6A37@microsoft.com...

>I feel like I'm forgetting something.  Assume Visual Studio 2005 (VB) and 
> assume you have created a data source and dataset by the usual means.   
> Assume multiple tables.  
> 
> Now you have a designer.vb module associated with the dataset containing an 
> InitConnection sub for each table, as well as an ominous message at the top 
> of the file warning against manual change.  (For simplicity's sake also 
> assume that you chose the option not to create an Application Setting 
> connection string.) 
> 
> Given this, is there any one place in the dataset I could programmatically 
> set the connection string, or must I always do it for each individual table 
> adapter, whenever one is instantiated?
Date:Wed, 11 Jul 2007 10:39:03 -0700   Author:  

Re: Question about automatic connection string settings using VS20   
No offense intended but that's the problem.  All of the connection string 
initialization is within the automatically generated dataset Designer.vb 
module and there appears to be no way to change the initialization other than 
by directly modifying the designer.vb code or by changing it through 
individual data adapters whenever they're instantiated.

"William (Bill) Vaughn" wrote:


> I would leverage the settings value created by the Data Source config wizard. 
> 
> Dim cn As New SqlClient.SqlConnection
> 
> cn.ConnectionString = My.Settings.CustomerConnectionString
> 
> hth
> -- 
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> -----------------------------------------------------------------------------------------------------------------------
> 
> "B. Chernick"  wrote in message news:7A251269-4947-4FEA-A596-CC0043BC6A37@microsoft.com...
> >I feel like I'm forgetting something.  Assume Visual Studio 2005 (VB) and 
> > assume you have created a data source and dataset by the usual means.   
> > Assume multiple tables.  
> > 
> > Now you have a designer.vb module associated with the dataset containing an 
> > InitConnection sub for each table, as well as an ominous message at the top 
> > of the file warning against manual change.  (For simplicity's sake also 
> > assume that you chose the option not to create an Application Setting 
> > connection string.) 
> > 
> > Given this, is there any one place in the dataset I could programmatically 
> > set the connection string, or must I always do it for each individual table 
> > adapter, whenever one is instantiated?
Date:Wed, 11 Jul 2007 11:16:05 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us