The normal way of using a SqlDataConnection type provider is as follows:
type dbSchema = SqlDataConnection<"Data Source=MYSERVER\INSTANCE;InitialCatalog=MyDatabase;Integrated Security=SSPI;">
let db = dbSchema.GetDataContext()
However we have a problem which is we want to use this type provider in an f# script where the connection string for the database is passed as a parameter. So what I would like to do is something like this:
let connectionString= Array.get args 1
type dbSchema = SqlDataConnection<connectionString>
However it gives the error "This is not a constant expression or valid custom attribute value"
Is there any way to do this?