Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
GeneralHtml Editor and Mail Program Pin
Dirso1-Dec-04 10:15
Dirso1-Dec-04 10:15 
GeneralRe: Html Editor and Mail Program Pin
cobyjone1-Dec-04 14:01
cobyjone1-Dec-04 14:01 
GeneralRe: Html Editor and Mail Program Pin
Dirso6-Dec-04 23:35
Dirso6-Dec-04 23:35 
Generalcaret position in a being edited Node Pin
TyronX1-Dec-04 10:03
TyronX1-Dec-04 10:03 
GeneralRe: caret position in a being edited Node Pin
Dave Kreskowiak1-Dec-04 10:55
mveDave Kreskowiak1-Dec-04 10:55 
GeneralRe: caret position in a being edited Node Pin
TyronX1-Dec-04 11:03
TyronX1-Dec-04 11:03 
GeneralRe: caret position in a being edited Node Pin
TyronX2-Dec-04 7:54
TyronX2-Dec-04 7:54 
GeneralWindowsPrincipal in non-AD environment Pin
Mike Hodnick1-Dec-04 8:21
Mike Hodnick1-Dec-04 8:21 
Questionhow to rewrite xml file Pin
IvyLee1-Dec-04 8:15
IvyLee1-Dec-04 8:15 
AnswerRe: how to rewrite xml file Pin
Christian Graus1-Dec-04 9:49
protectorChristian Graus1-Dec-04 9:49 
GeneralDynamically naming tabs Pin
thepersonof1-Dec-04 7:49
thepersonof1-Dec-04 7:49 
GeneralRe: Dynamically naming tabs Pin
RB@Emphasys1-Dec-04 9:23
RB@Emphasys1-Dec-04 9:23 
Generalcreating a list view like windows explorer view Pin
iffi9921-Dec-04 7:15
iffi9921-Dec-04 7:15 
GeneralRegex / String formatting question Pin
julian_l1-Dec-04 7:05
julian_l1-Dec-04 7:05 
GeneralRe: Regex / String formatting question Pin
Anonymous1-Dec-04 10:10
Anonymous1-Dec-04 10:10 
GeneralRe: Regex / String formatting question Pin
julian_l2-Dec-04 6:17
julian_l2-Dec-04 6:17 
GeneralRe: Regex / String formatting question Pin
Bitwise Gamgee1-Dec-04 11:53
Bitwise Gamgee1-Dec-04 11:53 
GeneralRe: Regex / String formatting question Pin
julian_l2-Dec-04 5:57
julian_l2-Dec-04 5:57 
Generalforeign key Pin
Mauricio Ritter1-Dec-04 4:20
Mauricio Ritter1-Dec-04 4:20 
GeneralRe: foreign key Pin
Heath Stewart1-Dec-04 13:30
protectorHeath Stewart1-Dec-04 13:30 
See the DataRelation class in the .NET BCL. It's pretty straight-forward and easy to make a typed DataSet by right-clicking on your project (or a folder under your project, which helps set the default namespace for your source files you add to them) and adding a new type, then choose DataSet. You can even drag and drop tables, views, and stored procedures from the server explorer to create elements (the DataSet designer is, after all, just the XML schema designer) that represent tables, while their elements represent fields. You can create primary keys and draw relationships. When you save this, it serializes using the CodeDomSerializer so that you have source code.

When you use it, instead of using DataSet ds = new DataSet();, for example, you would use MyDataSet ds = new MyDataSet();. That already has typed table and fiend names, as well as relationships established. Note, however, that the DataAdapter derivatives - or rather the command builders like SqlCommandBuilder - don't support auto-generation of complex statements required for updating a data source with changes.

All this is programmatic changes you can do manually, as well. It's most important to read the documentation, but you might also makes a typed DataSet in this manner and examine the source code (click "Project->Show Hidden Files" in the menu to see the source file itself).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: video capture Pin
Hugo Migneron1-Dec-04 4:07
Hugo Migneron1-Dec-04 4:07 
GeneralRe: video capture Pin
Mridang Agarwalla2-Dec-04 2:26
Mridang Agarwalla2-Dec-04 2:26 
GeneralRe: video capture Pin
Hugo Migneron2-Dec-04 3:47
Hugo Migneron2-Dec-04 3:47 
General.Net Remoting Pin
Bjoern.adG1-Dec-04 3:39
Bjoern.adG1-Dec-04 3:39 
GeneralRe: .Net Remoting Pin
Judah Gabriel Himango1-Dec-04 4:45
sponsorJudah Gabriel Himango1-Dec-04 4:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.