PC Review


Reply
Thread Tools Rate Thread

Ado.net and SQl view ???

 
 
=?Utf-8?B?Y2FsZGVyYXJh?=
Guest
Posts: n/a
 
      16th Jul 2007
Dear all,

I would like to bind a datgrid control to an SQL view.
How set SQL command type for a view ? Is it Text ?

IN which form the sql view is returned, data set ?

When I get my view bind to my grid, if new data is inserted in my database,
does my view will be automatically refreshed with new data or dor I have to
run the refresh my self with my datagrid ?

The idea is that I would like that my grid data gets automatically updated
if new data gets inserted and remove from my tables manged by the view

thnaks for help
regards
serge
 
Reply With Quote
 
 
 
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      16th Jul 2007
Think of an SQL VIEW as a macro that simplifies a SELECT statement. When you
execute a SELECT on a VIEW instead of a TABLE, you get a set of columns and
rows (a rowset) determined by the SQL in the VIEW. This means ADO.NET (or
ADO) can manage the rowset like any other--with some limitations if the VIEW
is too complex. AFA as data viability, the rowset returned from a view is
cached on your client system--just as if it came from a TABLE or procedure.
If you want to see current data, you have to requery somehow.

I discuss this issue in depth in my book.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"calderara" <(E-Mail Removed)> wrote in message
news:6FBF8822-7591-4814-B6DF-(E-Mail Removed)...
> Dear all,
>
> I would like to bind a datgrid control to an SQL view.
> How set SQL command type for a view ? Is it Text ?
>
> IN which form the sql view is returned, data set ?
>
> When I get my view bind to my grid, if new data is inserted in my
> database,
> does my view will be automatically refreshed with new data or dor I have
> to
> run the refresh my self with my datagrid ?
>
> The idea is that I would like that my grid data gets automatically updated
> if new data gets inserted and remove from my tables manged by the view
>
> thnaks for help
> regards
> serge


 
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
Re: Freeware to reset windows folder views from view->icons to view->details orbro Windows XP General 0 18th Feb 2010 06:10 PM
View formatting - Changes to view don't affect all folders using that view. Grahammer Microsoft Outlook Discussion 0 31st Aug 2004 03:49 PM
View formatting - Changes to view don't affect all folders using that view. Grahammer Microsoft Outlook 0 31st Aug 2004 03:49 PM
How to make a week view and day view calendar just like month view calendar in .NET ? Parthiv Joshi Microsoft VB .NET 2 7th Jul 2004 06:55 AM
MS Image View: how to switch from full view to normal view TGP Windows XP Photos 0 10th Dec 2003 05:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:31 AM.