Click here to Skip to main content
15,889,992 members
Home / Discussions / C#
   

C#

 
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 
Questionbad word filter, stemming, stopword, Windows System? Pin
god4k1-Dec-04 2:25
god4k1-Dec-04 2:25 
AnswerRe: bad word filter, stemming, stopword, Windows System? Pin
Dave Kreskowiak1-Dec-04 4:31
mveDave Kreskowiak1-Dec-04 4:31 
GeneralCode Analyser Tool Pin
Renjithvr1-Dec-04 2:14
Renjithvr1-Dec-04 2:14 
GeneralRe: Code Analyser Tool Pin
Judah Gabriel Himango1-Dec-04 4:48
sponsorJudah Gabriel Himango1-Dec-04 4:48 
Generallog in to hotmail Pin
Mridang Agarwalla1-Dec-04 1:20
Mridang Agarwalla1-Dec-04 1:20 
GeneralHosts file Pin
Mridang Agarwalla1-Dec-04 1:05
Mridang Agarwalla1-Dec-04 1:05 
GeneralRe: Hosts file Pin
Dave Kreskowiak1-Dec-04 4:27
mveDave Kreskowiak1-Dec-04 4:27 
GeneralRe: Hosts file Pin
Mridang Agarwalla2-Dec-04 1:32
Mridang Agarwalla2-Dec-04 1:32 
Generalurl cloaking Pin
Mridang Agarwalla1-Dec-04 0:56
Mridang Agarwalla1-Dec-04 0:56 
GeneralRe: url cloaking Pin
Daniel Turini1-Dec-04 1:26
Daniel Turini1-Dec-04 1:26 
GeneralRe: url cloaking Pin
Mridang Agarwalla2-Dec-04 1:26
Mridang Agarwalla2-Dec-04 1:26 
Generalserial port / parallel port Pin
Mridang Agarwalla1-Dec-04 0:40
Mridang Agarwalla1-Dec-04 0:40 

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.