![]() |
關於在visual C#中清除資料庫的內容
:on_65:請問各位大大:
在C#中新增一個Button,主要功能是要清除所連結的資料庫裡面的內容 請問應該要怎麼寫呢??:on_88: 另外,在下面的程式中,執行時在連結資料庫的時候似乎會有問題,請問大概是哪邊有問題呢? 謝謝各位大大的悉心解答~:on_81: private void Timer_Action_Tick(object sender, EventArgs e) { try { DataRow row = fpsdbDataSet.Tables[0].Rows[m_Pos]; axRemoteSetup.Load(); int i; for (i = 0; i < m_DVRCHANNEL ; i++) { axRemoteSetup.GetCam(i, "camtype", out(m_ANALOG)); axRemoteSetup.SetCam(i, "enable", row[5].ToString()); axRemoteSetup.SetNetworkService("rmapi", "monitor_framerate", row[6].ToString()); if (m_ANALOG == "Analog") { axRemoteSetup.SetCam(i, "resxy", row[2].ToString()); axRemoteSetup.SetCam(i, "quality", row[3].ToString()); axRemoteSetup.SetCam(i, "save_disk_space", row[4].ToString()); } else break; } Timer_Action.Interval = 1000 * 60 * Convert.ToInt16(row[1]); m_Pos++; axRemoteSetup.Save(); if (axRemoteSetup.LastTransferStatus ==Convert .ToInt16 ( Setupstatus.UNMONITOR)) { listBox_SetupLog.Items.Add("DVR isn't in monitor status"); Timer_Action.Enabled = false; } else if (axRemoteSetup.LastTransferStatus ==Convert .ToInt16 ( Setupstatus.SUCCESS)) { string date,time; axRemoteSetup.GetTimeInfo("datetime", "date", out(date)); axRemoteSetup.GetTimeInfo ("datetime","time",out(time)); listBox_SetupLog.Items.Add("No. " + row[0] + " Status:Success Windows Local Time:"+DateTime.Now+" DVR Local Tome:"+date+time); } else { listBox_SetupLog.Items.Add("Remote setup Faill"); Timer_Action.Enabled = false; } } catch (Exception) { Timer_Action.Enabled = false; button_StartFps.Enabled = true; } } |
問題一說明
1. 連資料庫 2. 下達Delete的SQL指令...(看你想刪哪個Table的資料就Delete哪個) ================================= 問題二說明 似乎會有問題?? 有問題就是有問題, 沒問題就是沒問題, 有問題就會有錯誤訊息, 請把錯誤訊息貼出來, 沒問題........那就是沒問題嘛 |
嗯嗯~了解了~謝謝唷!!~
問題已經解決了!! 感謝大大~ |
所有時間均為台北時間。現在的時間是 09:45 PM。 |
Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.
『服務條款』
* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *