SlideShare a Scribd company logo
Working With DesignersCIS-266
Connection StringStored in app.config (XML file)Connection string with a local database specifies a |DATA| directory
Database file is copied from project folder to bin folder when run projectSchema FileXSD file uses XML to define dataset contents
Form Contentsdataset manages data in memorytable adapter manages the requests for data (both in/out of db)Can include multiple SELECT statementstable adapter manager controls how to manage data changes to table and related tablesIn relational database order of edits matters
Form Contents - 2data grid view provides on screen display of data Includes built in tools – sorting, adjusting tablebinding navigator manages navigation of rows/editingbinding source connects form/controls to data setServes as “glue” to make sure the contents of each field in each row properly displayed in controls
BindingComplex data binding happens when dealing with rows and columns (grid, list controls)Simple data binding is for a control connected to a single column
Reading/Writing DataGetting data: Table adapter (or data adapter) has a FILL method that executes the SELECT statementAn argument specifies where the data should end up in memorySaving data: Table adapter (or data adapter) has an UPDATE methodTable adapter manager has an UPDATE ALL that manages the execution of updates to related tables
Reading/Writing Data - 2Ensure that all validation is done (Me.Validate) Ensure that no editing is going on before use Update (bindingsource.EndEdit)Referential integrity means order matters
ExceptionsHave exception classes for each data provider (SQL Server, Oracle, OLEDB, ODBC)Reading the Number property of SQL Server exception objects refers to the specific error from SQL ServerTypical exceptions in ADO.Netnot provider basedDB Concurrency - row in table is different that the original version (optimistic concurrency)Data Exception - generic exception from providerConstraint Exception violates validation rulesNo null allowed - required field is missing a value
Data Grid ExceptionsData grid can generate exceptionsValue in cell doesn't match requirements in data column (Null, invalid type)Can find the location of an exception by Row and Column (index values)
Refreshing DataAfter save data, may want to "refresh" the dataset - make sure what's in memory is same as what was saved, especially when have identity columns

More Related Content

PDF
Spssbaseusersguide160
PPTX
Database Basics
PDF
IBM SPSS Statistics Interface - Navigation
PPTX
IMPORT AND EXPORT UTILITIES IN MS-ACCESS
PDF
IBM SPSS Statistics: Download and Upload
PDF
Worksheet and workbooks linking
Spssbaseusersguide160
Database Basics
IBM SPSS Statistics Interface - Navigation
IMPORT AND EXPORT UTILITIES IN MS-ACCESS
IBM SPSS Statistics: Download and Upload
Worksheet and workbooks linking

What's hot (19)

PPTX
Stateful data serialization
PPT
Actuate sections
PDF
SAP ABAP data dictionary
PPTX
Abap dictionary 1
PPTX
asp.net data controls
PPT
Session x(ado.net)
PPTX
Krish data controls
PPT
Sql server basics
PPTX
Sql server basics
PDF
SQL Commands
PPTX
Ado.net
PPT
Three tier Architecture of ASP_Net
PPTX
What is a DATA DICTIONARY?
PPTX
Ms access 1
PPTX
Physical architecture of sql server
PDF
Asp.net interview questions
PPTX
PPT
Sql Server Basics
Stateful data serialization
Actuate sections
SAP ABAP data dictionary
Abap dictionary 1
asp.net data controls
Session x(ado.net)
Krish data controls
Sql server basics
Sql server basics
SQL Commands
Ado.net
Three tier Architecture of ASP_Net
What is a DATA DICTIONARY?
Ms access 1
Physical architecture of sql server
Asp.net interview questions
Sql Server Basics
Ad

Viewers also liked (18)

PDF
Fra domenech i montaner - 230109
DOC
Julio Pea Sonsonate 6 Julio De 2009
PPT
Исследования Zilver PTX (Бессонов И.С., Тюмень)
DOC
Informe Red En Rojos
PDF
Kriptografi
PPTX
Cosmetology School
PPT
Enterprise Wireless LAN Reliability
PDF
3 d lists powerpoint diagrams and powerpoint templates
PPTX
CIS 512-Week 4 Presentation
PPTX
Sam 2010v2 student_getting_started_june2011
PPTX
Green tea 10 24-11
PPT
Se Documenter3
PDF
Testimony: Navigational Coaching Workshop
DOC
2008 Docentes Y Especialidad
PDF
La cuisine lyonnaise
PPTX
Flickr youtube
PPT
C2.0 2010 d lacallade presentation version
PPT
PowerPoint Presentation
Fra domenech i montaner - 230109
Julio Pea Sonsonate 6 Julio De 2009
Исследования Zilver PTX (Бессонов И.С., Тюмень)
Informe Red En Rojos
Kriptografi
Cosmetology School
Enterprise Wireless LAN Reliability
3 d lists powerpoint diagrams and powerpoint templates
CIS 512-Week 4 Presentation
Sam 2010v2 student_getting_started_june2011
Green tea 10 24-11
Se Documenter3
Testimony: Navigational Coaching Workshop
2008 Docentes Y Especialidad
La cuisine lyonnaise
Flickr youtube
C2.0 2010 d lacallade presentation version
PowerPoint Presentation
Ad

Similar to Working with designers (20)

PPT
the .NET Framework. It provides the claf
PPTX
PATTERNS07 - Data Representation in C#
PPT
Marmagna desai
PPTX
PATTERNS08 - Strong Typing and Data Validation in .NET
PPS
Ado.net session05
PPSX
ADO.NET
PDF
5c8605.ado.net
PPS
Vb.net session 05
PPTX
Ado .net
PPTX
Is2215 lecture7 lecturer_ado_intro
PPTX
LECTURE 14 Data Access.pptx
PPT
Ado.net
PDF
Presentation on the ADO.NET framework in C#
PPTX
ADO.NET Introduction
PPS
Ado.net session01
PPTX
PPTX
Chapter 3: ado.net
PDF
Ado.Net Architecture
PPS
Ado.net session07
the .NET Framework. It provides the claf
PATTERNS07 - Data Representation in C#
Marmagna desai
PATTERNS08 - Strong Typing and Data Validation in .NET
Ado.net session05
ADO.NET
5c8605.ado.net
Vb.net session 05
Ado .net
Is2215 lecture7 lecturer_ado_intro
LECTURE 14 Data Access.pptx
Ado.net
Presentation on the ADO.NET framework in C#
ADO.NET Introduction
Ado.net session01
Chapter 3: ado.net
Ado.Net Architecture
Ado.net session07

More from Randy Riness @ South Puget Sound Community College (20)

Working with designers

  • 2. Connection StringStored in app.config (XML file)Connection string with a local database specifies a |DATA| directory
  • 3. Database file is copied from project folder to bin folder when run projectSchema FileXSD file uses XML to define dataset contents
  • 4. Form Contentsdataset manages data in memorytable adapter manages the requests for data (both in/out of db)Can include multiple SELECT statementstable adapter manager controls how to manage data changes to table and related tablesIn relational database order of edits matters
  • 5. Form Contents - 2data grid view provides on screen display of data Includes built in tools – sorting, adjusting tablebinding navigator manages navigation of rows/editingbinding source connects form/controls to data setServes as “glue” to make sure the contents of each field in each row properly displayed in controls
  • 6. BindingComplex data binding happens when dealing with rows and columns (grid, list controls)Simple data binding is for a control connected to a single column
  • 7. Reading/Writing DataGetting data: Table adapter (or data adapter) has a FILL method that executes the SELECT statementAn argument specifies where the data should end up in memorySaving data: Table adapter (or data adapter) has an UPDATE methodTable adapter manager has an UPDATE ALL that manages the execution of updates to related tables
  • 8. Reading/Writing Data - 2Ensure that all validation is done (Me.Validate) Ensure that no editing is going on before use Update (bindingsource.EndEdit)Referential integrity means order matters
  • 9. ExceptionsHave exception classes for each data provider (SQL Server, Oracle, OLEDB, ODBC)Reading the Number property of SQL Server exception objects refers to the specific error from SQL ServerTypical exceptions in ADO.Netnot provider basedDB Concurrency - row in table is different that the original version (optimistic concurrency)Data Exception - generic exception from providerConstraint Exception violates validation rulesNo null allowed - required field is missing a value
  • 10. Data Grid ExceptionsData grid can generate exceptionsValue in cell doesn't match requirements in data column (Null, invalid type)Can find the location of an exception by Row and Column (index values)
  • 11. Refreshing DataAfter save data, may want to "refresh" the dataset - make sure what's in memory is same as what was saved, especially when have identity columns