开发者

SQL Server 2008 USE database with [] Delphi ADO

In SQL server 2008 Management studio I can do this

Use [C:\test\somedb...]

When I use Delphi 2009 with the same command, using ADO, the [] seems to be interpreted as a parameter and the command fails with parameter improperly defined error. There is no parameter - I just need to use the [] because of the \ in the file name. Doubl开发者_运维问答e quotes don't work either in Delphi / ADO or Management Studio.

Thanks in advance...


With ADO, you don't typically USE in the SQL. You specify the database and the other information (driver, etc.) in the ConnectionString. It works in SSMS because that's not using ADO; SSMS uses the SQL Server client directly (which has different requirements than ADO).

You can find connection string information for your specific SQL Server version here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜