I do have big database table with 5-7 columns. Table contains personal info
i.e. first name, last name, address, province
My VB.NET application allows users to search this database table, and the
results will be displayed in datagrid. The results are 10 records or less.
Database table columns that can be searched by are indexed. As well, I
partitioned the table by province.
I ran my stored procedure from SSMS and the results were displayed in 2
seconds.
However, when I ran it from VB.NET, I get the results back from the server
after 30 sec. I used the debugger features to know how long it takes to
display the results in the datadrid view, and it was taking fractions of
the second.
'create the stored procedure
Dim sqlCmd As New SqlCommand(query_str, connection)
sqlCmd.ExecuteNonQuery()
'EXECUTE THE STORED PROCEDURE
command = New SqlCommand("data_" & Environment.UserName, connection)
command.CommandType = CommandType.StoredProcedure
Dim dr As SqlDataReader = command.ExecuteReader
<----------------------------------------------------------------------------------------------------
this is where the problem relies
table.Load(dr)
--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net