30-03-21, 08:53 AM
(30-03-21, 01:17 AM)اسامه الهرماوي كتب : السلام عليكم...
تفضل:
كود :
Try
If con.State = ConnectionState.Closed Then
con.Open()
End If
Dim Query As String = "Select Count(*) From patient Where 1=1"
Query = Query & " AND تنبية >= '" & Now.ToString("yyyy-MM-dd") & "'"
Query = Query & " AND تنبية <= '" & Now.ToString("yyyy-MM-dd") & "'"
Dim cmd As New SqlCommand(Query, con)
da = New SqlDataAdapter(cmd)
dt.Clear()
da.Fill(dt)
Dim RecordCount As Double
RecordCount = cmd.ExecuteScalar
TextBox4.Text = Val(RecordCount)
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
شكرا راح احاول بيه ??
