OData connection strings

CData ADO.NET Provider for OData

ATOM OData

Use this one to connect to ATOM data. (default data format is XML)

URL=http://dataService;Data Format=ATOM;

JSON OData

Use this one to connect to JSON data (default data format is XML)

URL=http://dataService;Data Format=JSON;

Caching data

URL=http://dataService;Cache Location=C:\cache.db;Auto Cache=true;Offline=false;

To retrieve data from the cache, use table name "table#Cache" in sql query. Example, "SELECT * FROM [Table#Cache]".

Caching data and metadata

URL=http://dataService;Cache Location=C:\cache.db;Auto Cache=true;Offline=false;Cache Metadata=true;

The table metadata will also be cached instead of retrieving it from the data source. This improves connection performance. Read more here →

Cached data only / Offline mode

URL=http://dataService;Offline=true;Query Passthrough=true;

SELECT statements will always retrieve data from the cache. DELETE/UPDATE/INSERT statements is not allowed and will throw an exception.

Using an External Cache Provider

RSSBus drivers have the ability to cache data in a separate database such as SQL Server or MySQL instead of in a local file using the following syntax:

Cache Provider=Provider.Namespace;Cache Connection='Connection String to Cache Database';

Above is just an example to show how it works. It can be used both with "Auto Cache" and with "Cached Data Only / Offline Mode".

Read more about using RSSBus Cache Provider in this article >>>

Customize headers

URL=http://dataService;Custom Headers=sourceHeader1:newHeader1\r\nsourceHeader2:newHeader2;

Note the \r\n (CRLF) separator between each header pair.

Connect through a firewall

URL=http://dataService;User=myUsername;Password=myPassword;Firewall Server=fireWallIPorDNSname;Firewall User=fwUserName;Firewall Password=fwPassword;

Specify firewall port

URL=http://dataService;User=myUsername;Password=myPassword;Firewall Server=fireWallIPorDNSname;Firewall User=fwUserName;Firewall Password=fwPassword;Firewall Port=1234;

Specify firewall type

URL=http://dataService;User=myUsername;Password=myPassword;Firewall Server=fireWallIPorDNSname;Firewall User=fwUserName;Firewall Password=fwPassword;Firewall Type=SOCKS5;

Valid values are TUNNEL, SOCKS4 and SOCKS5. TUNNEL uses port 80 as default. SOCKS4/5 uses port 1080 as default.

OAuth 2.0 init an access token

URL=http://dataService;OAuth Version=2.0;Initiate OAuth=true;OAuth Client ID=myRegisteredClientID;OAuth Client Secret=secretCodeRetrievedUponClientRegistration;
OAuth Authorization URL
=https://accounts.google.com/o/oauth2/auth;
OAuth Access Token URL=https://accounts.google.com/o/oauth2/token;

This works only for desktop applications. The connection will not store the access token and application authorization will happen on each connect.

Alternatively use the GetAccessToken stored procedure to manually retrieve the access token and create new connections providing the token into the "OAuth Access Token" connection string parameter. Please refer to the RSSBus documentation for details on this process or see this description.

OAuth 2.0 init with additional parameters

URL=http://dataService;OAuth Version=2.0;Initiate OAuth=true;OAuth Client ID=myRegisteredClientID;OAuth Client Secret=secretCodeRetrievedUponClientRegistration;
OAuth Authorization URL
=https://accounts.google.com/o/oauth2/auth;
OAuth Access Token URL=https://accounts.google.com/o/oauth2/token;
OAuth Params
=Any=Additional,Key=Value,PairsNeeded=ForAUTHENTICATIONstep;

The Params are appended to the "Access Token" step only.

OAuth 1.0 having an access token

URL=http://dataService;OAuth Version=1.0;OAuth Client ID=myRegisteredClientID;OAuth Client Secret=secretCodeRetrievedUponClientRegistration;OAuth Access Token=theAccountsAccessToken;
OAuth Access Token Secret
=theAccountsAccessTokenSecret;

OAuth 1.0 init an access token

URL=http://dataService;OAuth Version=1.0;Initiate OAuth=true;OAuth Client ID=myRegisteredClientID;OAuth Client Secret=secretCodeRetrievedUponClientRegistration;
OAuth Request Token URL
=https://www.google.com/accounts/OAuthGetRequestToken;
OAuth Authorization URL=https://www.google.com/accounts/OAuthAuthorizeToken;
OAuth Access Token URL
=https://www.google.com/accounts/OAuthGetAccessToken;

This works only for desktop applications. The connection will not store the access token and application authorization will happen on each connect.

Alternatively use the GetAccessToken stored procedure to manually retrieve the access token and create new connections providing the token into the "OAuth Access Token" connection string parameter. Please refer to the RSSBus documentation for details on this process.

OAuth 1.0 init with additional parameters

URL=http://dataService;OAuth Version=1.0;Initiate OAuth=true;OAuth Client ID=myRegisteredClientID;OAuth Client Secret=secretCodeRetrievedUponClientRegistration;
OAuth Request Token URL
=https://www.google.com/accounts/OAuthGetRequestToken;
OAuth Authorization URL=https://www.google.com/accounts/OAuthAuthorizeToken;
OAuth Access Token URL
=https://www.google.com/accounts/OAuthGetAccessToken;
OAuth Params=Any=Additional,Key=Value,PairsNeeded=ForAUTHENTICATIONstep;

The Params are appended to the "Access Token" step only.