views:

25

answers:

1

Is there a way to configure VS2008 so that it does NOT create SQL query strings with square brackets in my ASP .Net projects? I'm using a MySQL DB which doesn't like the brackets. Thanks.

+1  A: 

There's an option in the latest version of the MySQL connector which might help:

Sql Server Mode

Allow SQL Server syntax. When set to true enables Connector/NET to support square brackets around symbols instead of backticks. This enables Visual Studio wizards that bracket symbols with [] to work with Connector/NET. This option incurs a performance hit, so should only be used if necessary. This option was added in version 6.3.1.

Stuart Dunkeld
Works great! My connection string in web.config now looks like: <connectionStrings> <add name="v1ConnectionString" connectionString="server=localhost;User Id=root;password=root;Persist Security Info=True;database=btlogv1;Sql Server Mode=True" providerName="MySql.Data.MySqlClient" /> </connectionStrings>
john plourd