判斷C:\Test 是否存在

若不存在則透過 System.IO.Directory.CreateDirectory(dirPath); 來建立資料夾

 

string dirPath = @"C:\Test";

if (Directory.Exists(dirPath))

文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()

<add name="DatabaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=True;AttachDBFileName=|DataDirectory|\資料庫.mdf; User Instance=True" />


Roger 發表在 痞客邦 留言(0) 人氣()

要解決這個問題,可以新增公式來解決。
公式 :
'中華民國'+Trim(ToText(Year(CurrentDate) - 1911, '#00')) + '年'
 + ToText(Month(CurrentDate), '00') + '月' + 
ToText(Day(CurrentDate), '00')+'日'

Roger 發表在 痞客邦 留言(0) 人氣()

一、先設定印表機的格式
開始 --> 設定 --> 印表機及傳真  --> 檔案 --> 伺服器內容 --> 格式內 加入
中一刀 格式
使用英制
寛度 : 8.5英吋

文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()

<asp:TemplateField HeaderText="日期">
    <ItemTemplate>
        <asp:TextBox ID="TxtDate" runat="server" Text='<%# fn_Rtn_DATE(Eval("Date")) %>'></asp:TextBox>
    </ItemTemplate>
</asp:TemplateField>

文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()

        ''' <summary>
        ''' 判斷是否為整確的mail格式
        ''' </summary>
        ''' <param name="strMail">E-Mail</param>
        Public Shared Function IsEmail(ByVal strMail As String) As Boolean

文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()

select   *   from   table1   where   mydate   is   NULL   //為空


select   *   from   table1   where   mydate   is   not   NULL   //不為空


文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()

按鈕大小、高度變更

toolStrip屬性  autosize = false

 

按鈕圖片大小變更

在Button上把屬性 imagescaling 設為 none 即可

文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()

If MsgBox("確定訊息", MsgBoxStyle.OkCancel, "視窗標題") <> MsgBoxResult.Ok Then
    '不執行
    Return
End If

If MessageBox.Show("內容", "標題", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) <> MsgBoxResult.Ok  Then

文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()

在寫Access常會跳出"不支援結合運算式"的錯誤訊息。

這個錯誤的原因,常常都是因為在left join 再加了一個條件式,但卻忘了加( )。

以下附上完整的Sql 語法

Select 欄位1,欄位2,Table_1.欄位A FROM M_Key
LEFT JOIN Table_1 ON (Table_1.roomNo = M_Key.Key_Value AND Table_1.returned = 'item1')

文章標籤

Roger 發表在 痞客邦 留言(0) 人氣()