dotnetCHARTING Send comments on this topic.
ConnectionString Property
See Also  Example
dotnetCHARTING Namespace > Series Class : ConnectionString Property


Sets the database connection string used when dynamically obtaining charting data from a SQL statement.

Syntax

Visual Basic (Declaration)  
Public Property ConnectionString As String
Visual Basic (Usage) Copy Code
Dim instance As Series
Dim value As String
 
instance.ConnectionString = value
 
value = instance.ConnectionString
C#  
public string ConnectionString {get; set;}

Example

C# Copy Code
// 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";
    
Visual Basic Copy Code
'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"

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.

See Also