.netCHARTING v10.7 Documentation
Example 


dotnetCHARTING Namespace > Series Class : ConnectionString Property
ConnectionString Property (Series)
Sets the database connection string used when dynamically obtaining charting data from a SQL statement.
Syntax
'Declaration
 
Public Property ConnectionString As String
'Usage
 
Dim instance As Series
Dim value As String
 
instance.ConnectionString = value
 
value = instance.ConnectionString
public string ConnectionString {get; set;}
Remarks
This can be overridden or used in combination with the series level connectionstring. Access, Excel and SQL server are supported and automatically detected based on the connection string specified. See Getting Started > Tutorials > Connecting to data.
Example
// This will set the Access connection string default for all series.
Chart.DefaultSeries.ConnectionString = @"c:\chartsample.mdb";
 
//This will set the SQL server connection string default to all series:
Chart.DefaultSeries.ConnectionString ="server=server name or IP;uid=username;pwd=password;database=database name";
'This will Set the Access connection String Default For all series.
Chart.DefaultSeries.ConnectionString = "c:\chartsample.mdb" 
 
'This will Set the SQL server connection String Default To all series:
Chart.DefaultSeries.ConnectionString ="server=server name or IP;uid=username;pwd=password;database=database name"
Example
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also