PDA

View Full Version : سوال: ارتباط با دیتا بیس هایی که کاراکترهایی خاص در نام خود دارند مانند products-new-price در C#



kindboss
سه شنبه 07 دی 1389, 16:25 عصر
سلام من دیتا بیسی با نام products-new-price که روی سرور قرار گرفته هنگامی که می خواهم کانکشن رو open() کنم با خطای زیر مواجه می شم

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-new-price' at line 1

چطور می تونم به این دیتابیس کانکت شم. روشهای زیر رو هم امتحان کردم جواب نداد

1-
"Server=192.168.200.12; UserId=root; Password=;Database=products-new-price "@
"Server=192.168.200.12; UserId=root; Password=;Database='products-new-price' "@
"Server=192.168.200.12; UserId=root; Password=;Database=""products-new-price"" "@