在vb.net中执行的sql查询超时错误

时间:2013-10-29 12:17:38

标签: sql vb.net vb.net-2010

我的数据库中有1万(10万)个数据。如果我尝试删除content_details表中的内容详细信息,我发现时间错误。 我在字符串构建器中有内容ID列表 错误:

Timestamp: 10/29/2013 11:33:54 AM
Message: Exception thrown from:
    Thread was being aborted.
    at SNIReadSyncOverAsync(SNI_ConnWrapper* , SNI_Packet** , Int32 )
    at SNINativeMethodWrapper.SNIReadSyncOverAsync(SafeHandle pConn, IntPtr& packet, Int32 timeout)

活动代码:

Sql = "DELETE FROM content_details WHERE content_id IN (select id from dbo.splitid(@content_id, ','))" 
Using con As SqlConnection = New SqlConnection(m_RequestInfo.ConnectionString) 
    Using cmd As SqlCommand = New SqlCommand(Sql, con) 
        cmd.CommandType = CommandType.Text
        con.Open()
        cmd.Parameters.Add("@content_id", SqlDbType.NVarChar).Value = contIdList.ToString()
        cmd.CommandTimeout = 600
        cmd.ExecuteNonQuery()
    End Using
End Using

0 个答案:

没有答案