views:

42

answers:

2

Hello,

I have table in a SQL Server database with only 900 record with 4 column.

I am using Linq-to-SQL. Now I am trying retrieve data from that table for this I have written a select query.

Its not querying data from database and its showing time out error.

Please give me idea for this. First how can I increase time and second how can increase performance of query so can it easily access.

Thanks

+3  A: 

That is a tiny table, there is either something very wrong with your database, or your application.

Try seeing what is happening in the database with SQL Profiler.

Richard
+2  A: 

If you have just 900 records and four columns then unless you are storing many megabytes of data in each field the query should be very fast. I think your problem is that the connection is failing, possibly due to a firewall or other networking problem.

To debug I'd suggest running a simpler query and see if you can get any data at all. Also try running the same query from the SQL Server Management Studio to see if it works there.

Mark Byers
Connection string is ok bcoz rest of query is working fine.These tables have less values.
Pankaj Mishra
Try getting the query string and running it in SSMS to see if it works there.
Mark Byers