Client Interfaces Guide > Connecting to TDV Server through ADO.NET > Defining an ADO.NET Client using a Connection URL
 
Defining an ADO.NET Client using a Connection URL
It is possible to create client program and establish a connection to your data through TDV without having to define a DSN.
Note: The following instruction are guidelines only.
This topic also includes the following:
ADO.NET Driver Connection URL Properties
To create a client program without defining a DSN connection
1. Create and declare your connection URL, using the following syntax:
{Driver=<driver name>;Server=<fully qualified hostname>;Port=<port>;User=<username>;Password=<password>;domain=<domain name>;dataSource=<datasource name>
 
The following examples show how the syntax might be implemented in a C++ program.
 
Platform
Example
Windows
SQLCHAR dsn[] =
"Driver={TDV8.0};Server=localhost;Port=9401;User=admin;Password=admin;Domain=composite;dataSource=redwood;user=admin;password=admin;validateRemoteHostname=false;connectTimeout=3000;enableFastExec=false";
For other URL properties, see ADO.NET Driver Connection URL Properties.
2. Declare the user name and password variables for the connection statement.
3. (Optional) Determine the ADO.NET driver name using one of the following methods.
 
Platform
Location of Name
Windows
The driver name can be found from the Drivers tab of the ADO.NET Data Source Administrator.
4. (Optional) Write a small sample program to test the connection URL.
5. Create or modify your client program so that it includes the connection syntax. For example, you must include a statement similar to the following to establish the connection:
conn = DriverManager.getConnection(url, userName, password);