0

我正在使用 Visual Basic 2008 和 Sql Server 2000。在所有表单上,我正在保存跟进日期,用户选择一个日期并将其保存在相关表中,现在在存储的跟进日期,我需要在应用程序内弹出一个栏或通知告诉用户这是您对此特定记录的跟进日期。

我可以通过哪些方式做到这一点。

任何想法将不胜感激

谢谢

4

1 回答 1

0

我不完全理解你的问题。我不知道它是否适用于 Windows 表单或 Web 表单(Asp.net)我仍然试图回答它

您可以在存储过程中的插入命令之后使用 SELECT IDENT_CURRENT('MyTable') 来获取最后插入的 id 或验证它是否将数据插入到表中。

 public int InsertDate(string pid, string followUpDt)
        {
Try
{

            SqlParameter[] param = new SqlParameter[2];
            param[0] = new SqlParameter("@pid", pid);
            param[1] = new SqlParameter("@isScraped", isScraped);
            int identityId = (Int32)SqlHelper.ExecuteScalar(CommonCS.ConnectionString, CommandType.StoredProcedure, "Sproc_FollowUpDate_Insert", param);
 if(identityId != null)
{
// it means Values has been inserted to the table
// Call a Java Script function to Show popup & message
ScriptManager.RegisterStartupScript(Page,GetType(),"showConfirmPopup","<script>disp_confirm()</script>",false)
}
else
{
//Operation not successful
}
}

        }

}
Catch(exception ex)
{
//Log Exception to DB  OR Send Error Email

}

///在aspx中

<script type="text/javascript">
   function showConfirmPopup() {
       var msg = "Successful "
   //Show Popup code here
     </script>

============================更新答案==================== ================ 好的,您需要创建一个 SQL 作业,使其每天在特定时间发生。SQL Job 将通过存储过程调用一个 Web 服务 url(Invoke)

检查这个

现在,您可以根据该 Web 服务中的当前日期检查数据库日期。

于 2013-09-29T14:02:43.937 回答