|
|
|
我有查過網站上別人的同樣錯誤訊息 , 但程式不同所以無法引用在我的程式中
<%@ Page Title="" Language="VB" MasterPageFile="~/Main/MasterPage.master" AutoEventWireup="false" CodeFile="index.aspx.vb" Inherits="Main_index" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.style7
{
font-size: xx-large;
font-family: 標楷體;
text-align: left;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p>
</p>
<p class="style7">
<strong style="font-size: x-large"> 請假單</strong></p>
<p class="style7">
<asp:Label ID="Labname" runat="server" style="font-size: medium" Text="申請人"></asp:Label>
<asp:TextBox ID="Texname" runat="server"></asp:TextBox>
<asp:Label ID="Labvacation" runat="server" style="font-size: medium" Text="假別"></asp:Label>
<asp:DropDownList ID="Dropvacation" runat="server">
<asp:ListItem Selected="True">事假</asp:ListItem>
<asp:ListItem>公假</asp:ListItem>
<asp:ListItem>病假</asp:ListItem>
<asp:ListItem>婚假</asp:ListItem>
<asp:ListItem>喪假</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Labagent" runat="server" style="font-size: medium" Text="代理人"></asp:Label>
<asp:TextBox ID="Texagent" runat="server"></asp:TextBox>
</p>
<p class="style7">
<asp:Label ID="Labstday" runat="server" style="font-size: medium" Text="起日期"></asp:Label>
<asp:TextBox ID="Texstday" runat="server"></asp:TextBox>
</p>
程式太長 , 要怎麼才放得下
於 2012-08-20 16:45:17 補充
[-隱藏]
回應 wiselou:
1
wiselou 說:
在執行SqlCommand.Parameters.Add()添加參數之前
請先執行...SqlCommand.Parameters.Clear()
2012-08-20 20:42:51
2
wiselou 說:
這種錯誤,最常見的就是....
SqlDbCommand cmd = new SqlDbCommand("INSERT INTO table1 (field1) VALUES(@para)",conn);
foreach(var xxx in yyy)
{
cmd.Parameters.AddWithValue("para",xxx.value);
cmd.ExecuteNonQuery();
}
2012-08-20 21:17:32
3
cmkung 說:
請問是那裏有錯
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [vacation]"
InsertCommand="INSERT INTO vacation(name, vacarion, agent, startday, endday, totaltime, reason) VALUES (@name, @vacarion, @agent, @startday, @endday, @totaltime, @reason)">
2012-08-21 09:19:05
回應 :
請填寫您的回應,長度限為1,000個字,回應不計點數,也不限使用次數
邦友收藏動態
- 檔案系統的設計與效能 - 磁碟結構對檔案系統效能的影響 (channing342)
- 賽門鐵克:臺灣是全球傀儡網路重災區 (a0953278022)
- 蒸發不了的價值 (s863323)
- Google I/O:Google釋出Android Studio整合開發環境 (licsist)
- 分享大小事-個人儲存除了硬體也要軟體來配,個人儲存限定文! (temo)
- 蒸發不了的價值 (gpmap)
- 【書摘】從領導臉書Big Data團隊經驗談起:資訊平臺與資料科學家的崛起 (prtamith)
- 預先知道公司會停電,伺服器和網路設備都要關機嗎 (prtamith)
- 徹底搜查- 封鎖USB 2012 最新13招 (zuyan)
- 徹底搜查- 封鎖USB 2012 最新13招 (vaisramana)
相關問答
- 從ASP到ASP.NET
- [ASP.NET]ASP.NET 4.0 Overview-Core Services
- [ASP.NET]ASP.NET 4.0 Overview-New Features in Microsoft Ajax
- [ASP.NET]ASP.NET 4.0 Overview-Web Forms
- ASP.NET AJAX Framework 觀念與實作篇(OneNet魔力小子)
- [ASP.NET]DataTable 匯出Excel時凍結表頭(Frozen header)
- [ASP.NET 控制項實作 Day1] 建立 ASP.NET 伺服器控制項專案
- Microsoft TechEd Taiwan 2008 課程回顧 -- [ARC403] ASP.NET MVC
- [ASP.NET 控制項實作 Day21] 實作控制項智慧標籤(續)
- 你還在使用asp嗎?
- VISTA開發ASP.NET 3.5無法"在瀏覽器中檢視"(OneNet魔力小子)
- [ASP.NET 控制項實作 Day10] Media Player 控制項
- [ASP.NET 控制項實作 Day5] 屬性與 ViewState
- [ASP.NET 控制項實作 Day6] 事件與 PostBack
- ASP.NET 如何將檔案寫入到網路芳鄰的分享目錄
- ASP.NET的驗證與授權機制(動態錄影說明)
- ASP網頁還能存活幾年?
- [ASP.NET 控制項實作 Day2] 建立第一個伺服器控制項
- [ASP.NET 控制項實作 Day30] 整合 jQuery ContextMenu 的右鍵選單控制項
- ASP.NET 2.0如何使用Login來存取自己的使用者資料庫

閱讀(1348)

