473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dataset questions, vs2008

Hi

1. I am filling the dataset in my form load method as;

Me.MyTableAdapter.Fill(Me.MyDataSet.Clients).

What about the records that other users add to the database? Do I need to
run the fill command from time to time or will dotnet automatically fetch
these records periodically?

2. I am saving the data as below;

Me.Validate()
Me.MyBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.MyDataSet)

How will system react when concurrency violation occurs? How will system
inform me of it and how can I handle that?

Thanks

Regards
Dec 16 '07 #1
2 1200

"John" <Jo**@nospam.infovis.co.ukwrote in message
news:OF**************@TK2MSFTNGP04.phx.gbl...
Hi

1. I am filling the dataset in my form load method as;

Me.MyTableAdapter.Fill(Me.MyDataSet.Clients).

What about the records that other users add to the database? Do I need to
run the fill command from time to time or will dotnet automatically fetch
these records periodically?
No, ado.net won't do anything by default. So, either you do fetch from time
to time or use SQL Server's notification services.
>
2. I am saving the data as below;

Me.Validate()
Me.MyBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.MyDataSet)

How will system react when concurrency violation occurs? How will system
inform me of it and how can I handle that?
You might check "Optimistic Concurrency (ADO.NET)" help topic. Basically it
will tell you that an error happened (or not) in DataAdapter.RowUpdated
event.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Dec 16 '07 #2
Miha is right. ADO.NET is simply an interface to the data--if you want to
refresh the contents from the server, you must requery. Notification
Services is really a very drastic move though. Another approach not easily
implemented by ADO.NET is a "server-side" cursor. In this case you can
create a "window" on the selected rows and when you position to a specific
row, the interface fetches the current contents of that row--and just that
row. I describe this in detail in my latest book. This is called an "ANSI
Cursor".

--
__________________________________________________ ________________________
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)
__________________________________________________ __________________________________________
"John" <Jo**@nospam.infovis.co.ukwrote in message
news:OF**************@TK2MSFTNGP04.phx.gbl...
Hi

1. I am filling the dataset in my form load method as;

Me.MyTableAdapter.Fill(Me.MyDataSet.Clients).

What about the records that other users add to the database? Do I need to
run the fill command from time to time or will dotnet automatically fetch
these records periodically?

2. I am saving the data as below;

Me.Validate()
Me.MyBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.MyDataSet)

How will system react when concurrency violation occurs? How will system
inform me of it and how can I handle that?

Thanks

Regards
Dec 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Adam Knight | last post by:
Hi all, A couple of quick questions relating to datasets: Is one dataset in a given page generally used to bind all controls to db data? If a dataset object is to be used globally by all,...
0
by: DaveINOPS | last post by:
Trying to create a dataset out of an XML schema (.xsd), I get the following error message: DataSet doesn't support 'union' or 'list' as simpleType Using .NET2/VS2005. Is there a workaround? ...
2
by: jay | last post by:
I am confused; what is the current production release of the .NET Framework, 3.0, 3.5? How do I change the Project->References in my converted VS2005 Project->VS2008 Project to use the latest...
20
by: Iouri | last post by:
Hi everybody, We are currently using VS2003 and now we are in the porcess of upgrading to the next Visual Studio version. Does somebody have a real life experience with VS2008? My boss wants to...
2
by: Academia | last post by:
I have vs2005 installed on the System disk and vs2008 installed on a different disk. I want to remove VS2005. I read one time about some problem with uninstalling vs2005 after vs2008 is...
8
by: Frank Hauptlorenz | last post by:
Hello out there, I changed an existing and good working webservice from an wsHttpBinding to an NetTcpBinding. This is working (after trying some time) and has real a better performance! But...
3
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, There is a fatal error while installing VS2008 SP1 on Vista 64bit Business edition. The last line of error log is Installation failed with error code: (0x80070643) I tried to...
0
by: JerryShaw | last post by:
Problem: create a new winform app in C# VS2008. Drop a PropertyGrid component, Drop a DataSet (untyped) Set the PropertyGrid.SelectedObject to the DataSet. Run the application, and try to select...
1
by: dragon52 | last post by:
Hi, I am using VS2008 C#. I have manually created a typed dataset "DataSet1" then drag drop a table from an Access db. I want to populate this "DataSet1" from another dataset "dt" so that I can...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.