Finished
给出
无效的对象名称'已完成'。
就像我将MyDatabaseName.dbo.Finished
更改为dbo.Finished
或CREATE TABLE Finished (
partner_id UNIQUEIDENTIFIER,
survey_id INT,
PRIMARY KEY (partner_id,survey_id),
FOREIGN KEY (partner_id) REFERENCES Partners(id),
FOREIGN KEY (survey_id) REFERENCES Surveys(id)
);
GO
CREATE PROCEDURE CheckIfFinished
@pid UNIQUEIDENTIFIER,
@sid INT
AS
BEGIN
SELECT COUNT(*) FROM Finished WHERE partner_id=@pid AND survey_id=@sid;
END
GO
CREATE PROCEDURE UpdateFinishValue (@partner_id UNIQUEIDENTIFIER,
@survey_id INT,
@finished TINYINT)
AS
BEGIN
IF (@finished = 1 AND NOT EXISTS (SELECT 1
FROM Finished
WHERE Finished.partner_id=@partner_id AND Finished.survey_id=@survey_id))
INSERT INTO Finished (partner_id,survey_id) VALUES (@survey_id,@partner_id)
ELSE
DELETE FROM Finished WHERE partner_id=@partner_id AND survey_id=@survey_id
END
GO
一样。
没有任何意义。
完整的上下文是
tnStatus = [function or line of code that checks if Telnet is connected (w/o trying to open a connection), and returns boolean]
if(tnStatus == True):
sendComand('bla')
答案 0 :(得分:1)
DBMS无法找到此对象期间。
您可以使用以下简单查询检查表格:
select * from sys.sysobjects so
where so.name like N'%Finished%'
and so.xtype = N'U'
您问题的最常见原因是: