This project is read-only.


Can't execute SQL against the driver


When attempting to execute SQL get this error - 'A valid database connection string could not be obtained.'
Even though a valid database connection string was defined.

Cause: IConnectionInfo.DatabaseInfo.CustomCxString is not set to the connection string

Question: Why define a DriverDataElement for the connection string when there is all ready a specific field defined?
Closed Apr 12, 2012 at 3:36 PM by SolutionsDesign
Fixed in changeset id: 57b12bf959ca

It's not entirely implemented as the driver's intention isn't to run SQL. It will work if the user connects to a SQL Server service and a connection string to do so is specified in the connection dialog.


SolutionsDesign wrote Apr 12, 2012 at 3:10 PM

The driverdataelements are for the UI, so all UI elements are in that element. The custom cx string isn't set indeed, as I thought it was unnecessary (as the generated code obtains the connection string automatically. Not sure whether it will work anyway, as the driver doesn't pull the factory name as well.

JezzaT wrote Apr 13, 2012 at 11:24 AM

Well technically LINQPad runs the SQL, the CustomCxString just tells it what to use.
And yes to use anything other then sql server some UI would be needed to set DatabaseInfo.Provider (though I guess it could be deduced from the supplied assemblies somehow)

I run SQL in LINQPad all the time.

SolutionsDesign wrote Apr 16, 2012 at 12:38 PM

As the only thing that's used from the driver is the connection string (everything else is bypassed), I'll leave it as it is now for now.