Click here to Skip to main content
15,894,539 members
Home / Discussions / Database
   

Database

 
Questionrelatioships & datasets? [sqlservr 2005 , C# 05] Pin
giddy_guitarist13-Feb-07 19:32
giddy_guitarist13-Feb-07 19:32 
AnswerRe: relatioships & datasets? [sqlservr 2005 , C# 05] Pin
Colin Angus Mackay13-Feb-07 19:38
Colin Angus Mackay13-Feb-07 19:38 
GeneralRe: relatioships & datasets? [sqlservr 2005 , C# 05] Pin
giddy_guitarist13-Feb-07 20:03
giddy_guitarist13-Feb-07 20:03 
GeneralRe: relatioships & datasets? [sqlservr 2005 , C# 05] Pin
Colin Angus Mackay13-Feb-07 21:55
Colin Angus Mackay13-Feb-07 21:55 
Generalsome newbie questions:[sqlservr 2005 , C# 05] Pin
giddy_guitarist16-Feb-07 4:32
giddy_guitarist16-Feb-07 4:32 
GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
Colin Angus Mackay16-Feb-07 6:47
Colin Angus Mackay16-Feb-07 6:47 
GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
giddy_guitarist18-Feb-07 0:31
giddy_guitarist18-Feb-07 0:31 
GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
Colin Angus Mackay18-Feb-07 1:12
Colin Angus Mackay18-Feb-07 1:12 
giddy_guitarist wrote:
A business operation ends up manipulating data. Like if a something is added to the customers bill , BillingService adds it to the Customers Dues , this is just copying the amount into the Dues table , so this class is somewhat a mix between a data and business entity. Or should i have a seperate class under the dataServies namespace just to put an amount under a customers due?


Normally, the Data layer (DAL - Data Access/Abstraction Layer) will do all the data manipulation and the business class calls into the DAL.

e.g. This is a very simplistic example, and you'd probably want to have Address in a class of its own, but it illustrates the point:
class Person
{
    public void ChangeAddrss(string address1, string address2, string city, string postcode)
    {
        this.address1 = address1;
        this.address2 = address2;
        this.ciy = city;
        this.postcode = postcode;
        Dal.UpdatePersonAddress(this.personId, address1, address2, city, postcode);
    }
}

The Dal class does all the work to get data in and out of the database. The business object has no idea what it actually does, it just does it. It could send the data to SQL Server, to an XML file, or where ever. All the Business object knows is that there is something that needs to be stored and the Dal will store it.


giddy_guitarist wrote:
1. When i create a new sql db via VS i get a bunch of xsc , xss , xsd files and a Dataset?[like myDBDataSet] What are all these files?


No idea - I create databases in SQL Server and I don't use DataSets. I don't allow wizards to create anything for me. Wizards are greate for quick throw-away applications. But, if you use them for anything else you are making more work for yourself further down the line. Wizards make life especially complicated when you realise you've forgotten something - it is very hard to make changes to wizard generated code.


giddy_guitarist wrote:
2. Why does an application setting class have to be created. The only sepecial property i see is the connection string.


It is generally good practice to store the connection string in the app.config because then it can be updated without recompiling the applcation. You should not hard code connection strings into the application.


giddy_guitarist wrote:
DO i have to use the above class to change the conn string , my string will be a little complex because the application works over a network and it has to query the network class for the right path to the DB.


You don't have to. If you work without wizards it wouldn't create anything like that for you. The wizards guide you in certain ways - not aways the way you want to go.



GeneralRe: some newbie questions:[sqlservr 2005 , C# 05] Pin
giddy_guitarist18-Feb-07 2:37
giddy_guitarist18-Feb-07 2:37 
Questionsql triggers Pin
kalyan_241613-Feb-07 17:21
kalyan_241613-Feb-07 17:21 
QuestionJob Name Pin
Member 382635313-Feb-07 11:59
Member 382635313-Feb-07 11:59 
AnswerRe: Job Name Pin
Ennis Ray Lynch, Jr.13-Feb-07 12:13
Ennis Ray Lynch, Jr.13-Feb-07 12:13 
AnswerRe: Job Name Pin
Harini N K21-Feb-07 22:35
Harini N K21-Feb-07 22:35 
QuestionOrder of operations and Short circuit Pin
Keith Andersch13-Feb-07 9:51
Keith Andersch13-Feb-07 9:51 
AnswerRe: Order of operations and Short circuit Pin
Pete O'Hanlon13-Feb-07 10:13
mvePete O'Hanlon13-Feb-07 10:13 
GeneralRe: Order of operations and Short circuit Pin
Keith Andersch13-Feb-07 10:33
Keith Andersch13-Feb-07 10:33 
GeneralRe: Order of operations and Short circuit Pin
M A A Mehedi Hasan13-Feb-07 23:25
M A A Mehedi Hasan13-Feb-07 23:25 
GeneralRe: Order of operations and Short circuit Pin
Pete O'Hanlon13-Feb-07 23:45
mvePete O'Hanlon13-Feb-07 23:45 
QuestionProgram can't connect with the server ,, vb.net 2005 Pin
kindman_nb13-Feb-07 8:49
kindman_nb13-Feb-07 8:49 
AnswerRe: Program can't connect with the server ,, vb.net 2005 Pin
Pete O'Hanlon13-Feb-07 9:24
mvePete O'Hanlon13-Feb-07 9:24 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
kindman_nb13-Feb-07 9:30
kindman_nb13-Feb-07 9:30 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
Pete O'Hanlon13-Feb-07 9:40
mvePete O'Hanlon13-Feb-07 9:40 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
kindman_nb13-Feb-07 9:54
kindman_nb13-Feb-07 9:54 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
Pete O'Hanlon13-Feb-07 10:02
mvePete O'Hanlon13-Feb-07 10:02 
GeneralRe: Program can't connect with the server ,, vb.net 2005 Pin
kindman_nb13-Feb-07 20:56
kindman_nb13-Feb-07 20:56 

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.