QuotePrefix and QuoteSuffix
Posted: Fri 15 Apr 2005 09:01
I'm using MySQLDirect .NET 2.70. I have set QuotePrefix and QuoteSuffix to "`" to fix a problem about table names with spaces and special characters but it doesn't work.
It returns me an exception because it's not using prefixes correctly.
example:
You put this code
-->Insert command on Access (QuotePrefix and Quotesuffix = "[/]"):
And you have this Insert Command (tables could have spaces & special characters)
-->Insert Into [Table A]( [User Id], [User Name])
You put this code
-->Insert command on MySQL (QuotePrefix and Quotesuffix = "`"):
And MySQL seems not to work properly. It doesn't use prefix and suffix to contain table and colums names (I can't use spaces)
-->Insert Into Table A( User Id, User Name)
As you could see, it doesn't use prefixes to delimit table names and it causes an exception.
Maybe I'm not doing correctly. Do you have any idea?
Thanks
It returns me an exception because it's not using prefixes correctly.
example:
You put this code
-->Insert command on Access (QuotePrefix and Quotesuffix = "[/]"):
And you have this Insert Command (tables could have spaces & special characters)
-->Insert Into [Table A]( [User Id], [User Name])
You put this code
-->Insert command on MySQL (QuotePrefix and Quotesuffix = "`"):
And MySQL seems not to work properly. It doesn't use prefix and suffix to contain table and colums names (I can't use spaces)
-->Insert Into Table A( User Id, User Name)
As you could see, it doesn't use prefixes to delimit table names and it causes an exception.
Maybe I'm not doing correctly. Do you have any idea?
Thanks