dawoodkhan
New member
Hi All,
I am a new bee to vb.net and would be requiring a help here, can any one give an example that how should i do it.... thanks for your support
Windows Application
Front End: Vb.net
Backend: Oracle 10g
I am executing the sql query to fetch values and showing it in my datagrid..and when i do that it works perfectly fine...and problem is that it takes 10 min for my datagrid to fill...so in between i want to show the execution time to the user in another form till my query processing completes..
My Code:
Dim oradb As String = "Data Source=zorb;User Id=baady;Password=zacky;"
Dim conn As New OracleConnection(oradb) ' VB.NET
Try
conn.Open()
Dim cmd As New OracleCommand
cmd.Connection = conn
Dim sql As String = "Select * from QAtable where START_DT >= TO_DATE('12/18/2009','MM/DD/YYYY') order by DT_JOB_ID desc NULLS LAST"
cmd = New OracleCommand(sql, conn)
cmd.CommandType = CommandType.Text
da = New OracleDataAdapter(cmd)
cb = New OracleCommandBuilder(da)
ds = New DataSet()
da.Fill(ds)
DataGridView1.DataSource = ds.Tables(0)
Dim cm As CurrencyManager = BindingContext(DataGridView1.DataSource, DataGridView1.DataMember)
Dim dv As DataView = cm.List
dv.AllowNew = False
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message())
Finally
conn.Dispose()
End Try
Please quick help is required

I am a new bee to vb.net and would be requiring a help here, can any one give an example that how should i do it.... thanks for your support
Windows Application
Front End: Vb.net
Backend: Oracle 10g
I am executing the sql query to fetch values and showing it in my datagrid..and when i do that it works perfectly fine...and problem is that it takes 10 min for my datagrid to fill...so in between i want to show the execution time to the user in another form till my query processing completes..
My Code:
Dim oradb As String = "Data Source=zorb;User Id=baady;Password=zacky;"
Dim conn As New OracleConnection(oradb) ' VB.NET
Try
conn.Open()
Dim cmd As New OracleCommand
cmd.Connection = conn
Dim sql As String = "Select * from QAtable where START_DT >= TO_DATE('12/18/2009','MM/DD/YYYY') order by DT_JOB_ID desc NULLS LAST"
cmd = New OracleCommand(sql, conn)
cmd.CommandType = CommandType.Text
da = New OracleDataAdapter(cmd)
cb = New OracleCommandBuilder(da)
ds = New DataSet()
da.Fill(ds)
DataGridView1.DataSource = ds.Tables(0)
Dim cm As CurrencyManager = BindingContext(DataGridView1.DataSource, DataGridView1.DataMember)
Dim dv As DataView = cm.List
dv.AllowNew = False
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message())
Finally
conn.Dispose()
End Try
Please quick help is required