Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 06-02-2009
Member
 
Join Date: Jan 2009
Posts: 44
Need Design help to query the databse.

Hi,

I am workin with visual studio 2005, framework require help with windows forms.
I want to fetch data from database where i want to put a sql query which needs to be flexible in terms of where & order by clauses.
Can you suggest me any better method that I should use? The application will fetch one record from database at a time.
Reply With Quote
  #2  
Old 06-02-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: Need Design help to query the databse.

Try
1. ADO.NET SQL Command Objects
OR
2. ADO.NET Entities framework with Linq to Entities and ESQL
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #3  
Old 06-02-2009
Member
 
Join Date: Jan 2009
Posts: 38
Re: Need Design help to query the databse.

Well My databse is in Ms access & do you think ADO.NET Entities framework is worth learning for the same?

Regards,
Reply With Quote
  #4  
Old 06-02-2009
Member
 
Join Date: Jan 2009
Posts: 10
Re: Need Design help to query the databse.

If you're only bringing back 1 records at a time, why do you need an ORDER
BY?
Reply With Quote
  #5  
Old 06-02-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Need Design help to query the databse.

what you're describing can be done against an Access/JET/ACE or a SQL
Server database but if not done correctly, only one user will be able to
access the data at any one time. When you execute a query

SELECT name, address, city, state FROM Customers WHERE State = 'TX'
ORDER BY CountyCode, Name

you'll return all of the customers in Texas--one row at a time if you use a
DataReader. However, until you fetch the last row, the database engine will
(probably) impose "share locks" on the data rows (and pages) that will
prevent changes to the underlying rows. For this reason (and many others) we
generally fetch the rows into a server-side cursor or into a client-side
structure like a DataTable or TableAdapter using a Fill or Load method. This
releases the locks and lets other users access the data.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Need Design help to query the databse."
Thread Thread Starter Forum Replies Last Post
What mistakes to avoid in SQL Server query design Galbraith Software Development 5 06-03-2010 03:49 AM
Pass query in design mode in Access 2007 Chandranath Windows Software 5 08-01-2010 06:45 AM
Unable to modify the databse with the same name as an existing database Reckon Software Development 3 08-08-2009 10:48 AM
Turn on MySQL query cache to speed up query performance DMA2Superman Software Development 3 07-07-2009 10:26 AM
Active Directory and DMZ design query MilesAway Active Directory 2 16-02-2008 11:48 AM


All times are GMT +5.5. The time now is 02:50 PM.