title: Pass by reference in vb.net
body: <p>Hello I'm new to oracle and vb.net. I'm using vb.net for this application.
  How I'm going to pass the result of the function from <code>GetMaterial</code> and <code>GetDescription</code> to the function <code>GetDate</code>  ? 
  What should i do ? </p>
  
  <pre><code>  Private Function GetMaterial(ByVal strMaterial As String) As DataSet
  
      Dim connectionString As String = "Data Source = ***; User ID = *****; Password = ***;"
      Dim sqlConnection As OracleClient.OracleConnection = New OracleClient.OracleConnection(connectionString)
  
      Dim queryString As String = "select * from abc where device = 'xyz' "
  
      Dim sqlCommand As OracleClient.OracleCommand = New OracleClient.OracleCommand(queryString, sqlConnection)
      sqlCommand.CommandTimeout = 0
  
      Dim dataAdapter As OracleClient.OracleDataAdapter = New OracleClient.OracleDataAdapter(sqlCommand)
      Dim dataSet As DataSet = New DataSet
      dataAdapter.Fill(dataSet)
  
      Return dataSet
  
  End Function
  
  Private Function GetDescription(ByVal strMaterial As String, ByVal ListBox1 As String) As DataSet
  
      Dim connectionString As String = "Data Source = ***; User ID = ***; Password = ***;"
      Dim sqlConnection As OracleClient.OracleConnection = New OracleClient.OracleConnection(connectionString)
  
      Dim queryString As String = "select * from abc where lpt = '" &amp; ListBox1 &amp; "' and device = '" &amp; strMaterial &amp; "'"
  
  
      Dim sqlCommand As OracleClient.OracleCommand = New OracleClient.OracleCommand(queryString, sqlConnection)
      sqlCommand.CommandTimeout = 0
  
  
      Dim dataAdapter As OracleClient.OracleDataAdapter = New OracleClient.OracleDataAdapter(sqlCommand)
      Dim dataSet As DataSet = New DataSet
      dataAdapter.Fill(dataSet)
  
      Return dataSet
  
  End Function
  
  Private Function GetDate(ByVal strMaterial As String, ByVal ListBox1 As String, ByVal bdp1 As String) As DataSet
  
      Dim connectionString As String = "Data Source = ***; User ID = ***; Password = ***;"
      Dim sqlConnection As OracleClient.OracleConnection = New OracleClient.OracleConnection(connectionString)
  
  
      Dim queryString As String = "select * from abc where tran_dttm &lt;= to_date('1/31/2012','MM-DD-YYYY') and tran_dttm &gt; to_date('1/30/2012','MM-DD-YYYY')"
  
  
      Dim sqlCommand As OracleClient.OracleCommand = New OracleClient.OracleCommand(queryString, sqlConnection)
      sqlCommand.CommandTimeout = 0
  
  
      Dim dataAdapter As OracleClient.OracleDataAdapter = New OracleClient.OracleDataAdapter(sqlCommand)
      Dim dataSet As DataSet = New DataSet
      dataAdapter.Fill(dataSet)
  
      Return dataSet
  
  End Function
  </code></pre>