看看这个错误的原因
sSql = "INSERT INTO HxxdSys..HDSystem_DataBases(DataBasesName, Number, CountingRoomName, NewDate, ServerName, DatabaseType, YNuse, CoName, qsqj)" _& " VALUES('" & NewDBName & "','" & Number & "','" & CountingRoomName & "',GETDATE(),'" & ServerName & "','" & DBType & "','0','','1') "这一句那里有问题,总是运行到这里出错。提示:第一行:‘_’附近有语法错误。(-2147217900).
--------------------编程问答-------------------- sSql = "INSERT INTO HxxdSys..HDSystem_DataBases(DataBasesName, Number, CountingRoomName, NewDate, ServerName, DatabaseType, YNuse, CoName, qsqj)" & _
& " VALUES('" & NewDBName & "','" & Number & "','" & CountingRoomName & "',GETDATE(),'" & ServerName & "','" & DBType & "','0','','1') "
试试看 --------------------编程问答--------------------
--------------------编程问答-------------------- 看语句好像没问题,看看这些变量的具体值
HxxdSys..
& "',"' & GETDATE() & "','"
补充:VB , 数据库(包含打印,安装,报表)