|
|
|
<VB2008>อยากทราบ Code ที่ บันทึกละหว่าง วันที่ นี้ ถึง วันที่นี้ อ่ะครับ |
|
|
|
|
|
|
|
Code (VB.NET)
Dim strSQL As String = " SELECT * FROM table_name WHERE create_date BETWEEN " & Me.Date1.Text & " AND " & Me.Date2.Text & " "
|
|
|
|
|
Date :
2012-01-10 06:02:11 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ถ้าผมจะบันทึกข้อมูลอื่นลงไปด้วย ผมเขียนโค๊ดงี้มัน Error อ่ะครับ
Code (VB.NET)
sql1 = "Insert into schedules WHERE create_date BETWEEN " & DateTimePicker1.Value.ToLongDateString & " AND " & DateTimePicker2.Value.ToLongDateString & " values ('" & (ListView1.Items(i).SubItems(1).Text) & "','" & DateTimePicker1.Value.ToLongDateString & "','" & DateTimePicker2.Value.ToLongDateString & "','" & (ListView1.Items(i).SubItems(4).Text) & "','" & (ListView1.Items(i).SubItems(5).Text) & "','" & (ListView1.Items(i).SubItems(6).Text) & "','" & (ListView1.Items(i).SubItems(7).Text) & "')"
|
|
|
|
|
Date :
2012-01-10 21:10:46 |
By :
Evil |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (VB.NET)
sql1 = "Insert into schedules values ('" & (ListView1.Items(i).SubItems(1).Text) & "','" & DateTimePicker1.Value.ToLongDateString & "','" & DateTimePicker2.Value.ToLongDateString & "','" & (ListView1.Items(i).SubItems(4).Text) & "','" & (ListView1.Items(i).SubItems(5).Text) & "','" & (ListView1.Items(i).SubItems(6).Text) & "','" & (ListView1.Items(i).SubItems(7).Text) & "'WHERE create_date BETWEEN " & DateTimePicker1.Value.ToLongDateString & " AND " & DateTimePicker2.Value.ToLongDateString & ""
อันนี้ ก็ไม่ได้ = ='
|
|
|
|
|
Date :
2012-01-10 21:42:56 |
By :
Evil |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|