本文介绍了正确的字符串格式,请帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要执行一个查询,即:
I want to execute one query that is:
string query= " RESTORE DATABASE alaki125 FROM DISK ='" + path + "' with move 'alaki' to '" + destination + "'MOVE'alaki_log' to '" + destinationlog + "'";
但是发生了此异常:Incorrect syntax near MOVE
But this exception occured:Incorrect syntax near MOVE
推荐答案
string query= " RESTORE DATABASE alaki125 FROM DISK ='" + path + "' with move 'alaki' to '" + destination + "', MOVE 'alaki_log' to '" + destinationlog + "'";
要获取正确的语法,请点击此处.
For correct syntax click here.
string query = string.Format(" RESTORE DATABASE alaki125 FROM DISK ='{0}' with move 'alaki' to '{1}', MOVE 'alaki_log' to '{2}'", path, destination, destinationlog);
这篇关于正确的字符串格式,请帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!