Hi
The following code will connect the sql adapter and sql command, applying this will solve the timeout exception
DbConn.Open()
Dim DbCmd As New SqlClient.SqlDataAdapter
Dim cmd As New SqlCommand(sSQL, DbConn)
cmd.CommandTimeout = 250
DbCmd.SelectCommand = cmd
Dim Dt As New DataTable
DbCmd.Fill(Dt)
DbConn.Close()
Return Dt
Same logic can be applied to oledb command also
Dim DbCmd As New OleDb.OleDbDataAdapter
Dim cmd As New OleDb.OleDbCommand(sSQL, OraConn)
cmd.CommandTimeout = 250
DbCmd.SelectCommand = cmd
Dim Dt As New DataTable
DbCmd.Fill(Dt)
DbConn.Close()
Return Dt
Happy Programming