Gaston Valiente
Gaston Valiente

Reputation: 1

Unrecognized property 'CommType' in connection string using Advantage Data Provider with Entity Framework

I'm trying to set CommType in connection string for Advantage DataBase Server using Entity Framework 5 and Advantage Data Provider in a .NET Web Application.

Connection string is in properties.config file. I trie to use ads.ini but I don't know where to put it (I try in wwwroot/site/bin but nothing happened)

I need to set this parameters:

RETRY_ADS_CONNECTS = 5
PACKET_SIZE=512
USE_TCP_IP = 1

I can do this whiteout errors, but not using properties.config file.

AdsConnection conn = new AdsConnection("data source=\\\\SERVER1\\DATA; ServerType=remote;TableType=CDX;CommType = TCP_IP");

Any clue about how to solve this? Using ADS.INI or properties.config file, same for me. Thank you!

Gaston Brave.

Upvotes: 0

Views: 117

Answers (1)

Ken White
Ken White

Reputation: 125728

You can use the ADS.INI file for this purpose. Where it needs to be located (or how to tell Advantage where to find it) depends on the OS you're using.

From the Advantage Help file topic ADS.INI:

Windows

In order for the ads.ini file to be used, it must be located in the application directory, the Windows directory, the Windows System directory, or the client's search path.

In addition, if an environment variable exists with the name adsini_path, that path will be used to locate the ads.ini file. This can be helpful when you do not want to modify the application’s search path, but still need the ads.ini file to exist in a directory multiple users have rights to (for example on Windows Vista installations). An application can often set the environment variable at run-time before calling any Advantage functions, which avoids the need to set a per-workstation environment variable.

Linux

In order for the ads.ini file to be used, it must be located in the application directory, a directory specified in an environment variable named ADSPATH, in the users home directory, or in the /etc directory. If located in the users home directory the ads.ini file should be named .ads.ini (note the initial "dot").

Upvotes: 1

Related Questions