Private Function GetDate( ByVal bdp1 As date) As DataSet Dim connectionString As String = "Data Source = abc; User ID = ***; Password = ***;" Dim sqlConnection As OracleClient.OracleConnection = New OracleClient.OracleConnection(connectionString) Dim queryString As String = "select * from table_abc where (column_name<= to_date( 'user_input' ,'MM/DD/YYYY') and column_name > to_date( 'user_input' ,'MM/DD/YYYY') Dim sqlCommand As OracleClient.OracleCommand = New OracleClient.OracleCommand(queryString, sqlConnection) sqlCommand.CommandTimeout = 0 sqlCommand.Parameters.Add(New OracleParameter(":bdp1", OracleType.DateTime)).Value = bdp1 Dim dataAdapter As OracleClient.OracleDataAdapter = New OracleClient.OracleDataAdapter(sqlCommand) Dim dataSet As DataSet = New DataSet dataAdapter.Fill(dataSet) Return dataSet End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)