PC Review


Reply
Thread Tools Rate Thread

Design advise please

 
 
John
Guest
Posts: n/a
 
      30th Jan 2009
Hi

I need to design a winform db app preferably with bound controls. The app
will pick only one record at a time from backend db. The sql query that
brings data from backend needs to be flexible in terms of WHERE and ORDER BY
clauses. What data access method should I use?

Many Thanks

Regards


 
Reply With Quote
 
 
 
 
Mr. Arnold
Guest
Posts: n/a
 
      30th Jan 2009

"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I need to design a winform db app preferably with bound controls. The app
> will pick only one record at a time from backend db. The sql query that
> brings data from backend needs to be flexible in terms of WHERE and ORDER
> BY clauses. What data access method should I use?
>


ADO.NET SQL Command Objects is one. Orr better yet, ADO.NET Entities
framework with Linq to Entities and ESQL, if you can use VS2008 and the 3.5
framework. ADO.NET Entities framework works with many database providers.


 
Reply With Quote
 
John
Guest
Posts: n/a
 
      30th Jan 2009
I am using vs2008. I am not experienced in ADO.NET Entities framework. Is it
worth learning for the benefits it offer? Is there a tutorial that gets me
started?

Thanks

Regards

"Mr. Arnold" <MR. (E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "John" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi
>>
>> I need to design a winform db app preferably with bound controls. The app
>> will pick only one record at a time from backend db. The sql query that
>> brings data from backend needs to be flexible in terms of WHERE and ORDER
>> BY clauses. What data access method should I use?
>>

>
> ADO.NET SQL Command Objects is one. Orr better yet, ADO.NET Entities
> framework with Linq to Entities and ESQL, if you can use VS2008 and the
> 3.5 framework. ADO.NET Entities framework works with many database
> providers.
>
>



 
Reply With Quote
 
John
Guest
Posts: n/a
 
      30th Jan 2009
Is ADO.NET Entities framework also useable with MS Access which is my
backend db?

Thanks

Regards

"Mr. Arnold" <MR. (E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "John" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi
>>
>> I need to design a winform db app preferably with bound controls. The app
>> will pick only one record at a time from backend db. The sql query that
>> brings data from backend needs to be flexible in terms of WHERE and ORDER
>> BY clauses. What data access method should I use?
>>

>
> ADO.NET SQL Command Objects is one. Orr better yet, ADO.NET Entities
> framework with Linq to Entities and ESQL, if you can use VS2008 and the
> 3.5 framework. ADO.NET Entities framework works with many database
> providers.
>
>



 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      30th Jan 2009
No

"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is ADO.NET Entities framework also useable with MS Access which is my
> backend db?
>
> Thanks
>
> Regards
>
> "Mr. Arnold" <MR. (E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>> "John" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hi
>>>
>>> I need to design a winform db app preferably with bound controls. The
>>> app will pick only one record at a time from backend db. The sql query
>>> that brings data from backend needs to be flexible in terms of WHERE and
>>> ORDER BY clauses. What data access method should I use?
>>>

>>
>> ADO.NET SQL Command Objects is one. Orr better yet, ADO.NET Entities
>> framework with Linq to Entities and ESQL, if you can use VS2008 and the
>> 3.5 framework. ADO.NET Entities framework works with many database
>> providers.
>>
>>

>
>


 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      30th Jan 2009
John,

In this case I would create some textboxes on screen and then simple move by
"=" to the text property of the textboxes.
You don't update something so bound controls don't add anything.

Then an OleDbDataReader.

You can then every time change the Select string by Cmd.CommandText =
"Select ..............................."

Or even make the select string more dynamic by doing it as "Select
................... & OrderByClause

As somebody starts telling about vulnaribilty by SQL intection, be aware
that it is culprit in this case.
All was it alone that you cannot reach a Jet database direct over the
Internet.

In the sample in this link is used the integer as indexer, you can us as
well strings, I always use that because the integer gives direct problems as
you change the place of a column in your Sql statement or use an * and
change the columns in your database.
http://msdn.microsoft.com/en-us/libr...atareader.aspx

Cor

"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I need to design a winform db app preferably with bound controls. The app
> will pick only one record at a time from backend db. The sql query that
> brings data from backend needs to be flexible in terms of WHERE and ORDER
> BY clauses. What data access method should I use?
>
> Many Thanks
>
> Regards
>


 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      30th Jan 2009
If you're only bringing back 1 records at a time, why do you need an ORDER
BY?


If you're bent on using access (actually "JET database" is a better term for
it, since you won't be using the program Microsoft Access)......then look
here:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!176.entry

You CAN build an application that starts in Access, but doesn't paint you
into a corner.

.....................

What version of the Framework are you considering using??



"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I need to design a winform db app preferably with bound controls. The app
> will pick only one record at a time from backend db. The sql query that
> brings data from backend needs to be flexible in terms of WHERE and ORDER
> BY clauses. What data access method should I use?
>
> Many Thanks
>
> Regards
>



 
Reply With Quote
 
John
Guest
Posts: n/a
 
      30th Jan 2009
Hi

Thanks. I have sql server all editions from MSDN. I need to design another
interface to the existing access app that is already deployed for several
years and unfortunately can't get rid of access except first re-writing the
original access app to sql server which is a daunting task.

Regards

"Mr. Arnold" <MR. (E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> "John" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Is ADO.NET Entities framework also useable with MS Access which is my
>> backend db?

>
>
> Well, that's a problem there as it doesn't work with Access, You know
> there is MS SQL Server Express 2005 and 2008 with is free to download and
> use, which can be deployed just like an Access database solution. Also,
> it's a much more powerful than access as a database solution.
>
> ADO.Entities framework does work with SQL Express.
>
>
> This is about as close as I can get for you. Maybe, there is a VB version.
>
> <http://www.free-ebooks-download.org/free-ebook/dotnet/CSharp/pro-linq-language-integrated-query-in-csharp-2008.php>
>



 
Reply With Quote
 
John
Guest
Posts: n/a
 
      30th Jan 2009
Its the order in which I pick next or previous record in sequence.

Regards

"sloan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If you're only bringing back 1 records at a time, why do you need an ORDER
> BY?
>
>
> If you're bent on using access (actually "JET database" is a better term
> for it, since you won't be using the program Microsoft Access)......then
> look here:
> http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!176.entry
>
> You CAN build an application that starts in Access, but doesn't paint you
> into a corner.
>
> ....................
>
> What version of the Framework are you considering using??
>
>
>
> "John" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi
>>
>> I need to design a winform db app preferably with bound controls. The app
>> will pick only one record at a time from backend db. The sql query that
>> brings data from backend needs to be flexible in terms of WHERE and ORDER
>> BY clauses. What data access method should I use?
>>
>> Many Thanks
>>
>> Regards
>>

>
>



 
Reply With Quote
 
William Vaughn \(MVP\)
Guest
Posts: n/a
 
      30th Jan 2009
John, 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.

The query shown above can be fed with one or more Parameters (via the
Command object) to focus the rowset--fewer rows mean fewer locks and less
overhead for everyone.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________



"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Its the order in which I pick next or previous record in sequence.
>
> Regards
>
> "sloan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> If you're only bringing back 1 records at a time, why do you need an
>> ORDER BY?
>>
>>
>> If you're bent on using access (actually "JET database" is a better term
>> for it, since you won't be using the program Microsoft Access)......then
>> look here:
>> http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!176.entry
>>
>> You CAN build an application that starts in Access, but doesn't paint you
>> into a corner.
>>
>> ....................
>>
>> What version of the Framework are you considering using??
>>
>>
>>
>> "John" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hi
>>>
>>> I need to design a winform db app preferably with bound controls. The
>>> app will pick only one record at a time from backend db. The sql query
>>> that brings data from backend needs to be flexible in terms of WHERE and
>>> ORDER BY clauses. What data access method should I use?
>>>
>>> Many Thanks
>>>
>>> Regards
>>>

>>
>>

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Design advise please John Microsoft ADO .NET 14 4th Feb 2009 09:44 PM
Design advise please John Microsoft VB .NET 14 4th Feb 2009 09:44 PM
App design advise John Microsoft VB .NET 5 23rd Apr 2008 09:34 PM
App design advise John Microsoft VB .NET 8 13th Jul 2005 12:02 AM
App design advise John Microsoft ADO .NET 5 12th Jul 2005 03:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:39 PM.