Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question

Status
Not open for further replies.

lifesupport

Programmer
May 18, 2004
64
US
I'm trying to visually connect a database to a grid. While configuring the select statement in the 'Configure Data Source', I select the 'Advance' button. The 'Generate INSERT, UPDATE, and DELETE statements and the 'Use optimistic concurrency' options are not enabled; therefore, I can't select them. I need to allow users update my table. Can anyone tell me why this may not be allowing me to update the table? I'm using SQL server (Developer) and not SQL Express. Does this wizzard only work with SQL Express? If so, how can I allow users to update data on SQL server? I suppose it's not wise to allow users to update data on the server, but this is for practice. Ultimately, I'd like users to update a view.
Thanks
 
I'm trying to visually connect a database to a grid.
this is your problem. there is too much black box magic happening with wizards. not too mention they promote very poor system architectures.

learn ado.net to understand how to interact with the database. after that research .net ORMs to learn how to access a database without the need for raw ado.net objects.

there are a number of tutorials about how to connect to a database in .net. Understand the interfaces
IDbConnection
IDbCommand
IDbParameter
IDbDataReader
DbProviderFactory (class)

To work with the data in a disconnected fashion you will need to load the values from ado.net into common objects. this can be done using
DataTable
DataSet
or using custom POCOs (plain old compiled objects).

I prefer pocos since most ORMs require them. You can also explicitly define the intention of the object. Datatable/sets are just generic containers.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top