24-11-18, 08:18 AM
(آخر تعديل لهذه المشاركة : 24-11-18, 08:19 AM {2} بواسطة asemshahen5.)
كود :
Public Function SelectBetweenVB(Date1 As String, Date2 As String, StrTableName As String, StrColumnName As String) As DataTable
Dim StrSQL As String = "Select * FROM " & StrTableName & " Where " & StrColumnName & " BETWEEN #" & Date1 & "# and #" & Date2 & "# "
Dim cn As New SqlClient.SqlConnection("Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=True")
Dim da As New SqlClient.SqlDataAdapter(StrSQL, cn)
Dim dt As New DataTable
da.Fill(dt)
Return dt
End Functionسبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
