Reputation: 48687
I'm trying to access a database with something like:
type dbSchema = SqlDataConnection<"DSN=foo;UID=readonly;PWD=bar;">
but it doesn't like the DSN and gives the error "the type provider '...' reported an error: Keyword not supported 'dsn'".
Can I get this to work and, if so, how?
Upvotes: 2
Views: 286
Reputation: 13577
This is only my conjecture, but if SqlDataConnection type provider sits on top of the default .NET SqlClient, then it doesn't support DSN. See a note on this page:
The .NET Framework Data Provider for SQL Server uses its own protocol to communicate with SQL Server. Therefore, it does not support the use of an ODBC data source name (DSN) when connecting to SQL Server because it does not add an ODBC layer.
You might have more luck with a different SQL type provider that handles ODBC, perhaps this one.
Upvotes: 2