Click here to Skip to main content
15,891,253 members
Home / Discussions / Database
   

Database

 
AnswerRe: pls can u mail how to use ajax controls in .net Pin
Colin Angus Mackay21-Dec-06 1:55
Colin Angus Mackay21-Dec-06 1:55 
QuestionDelete query Pin
Tauseef A20-Dec-06 23:38
Tauseef A20-Dec-06 23:38 
AnswerRe: Delete query Pin
Colin Angus Mackay20-Dec-06 23:53
Colin Angus Mackay20-Dec-06 23:53 
GeneralRe: Delete query Pin
Tauseef A20-Dec-06 23:55
Tauseef A20-Dec-06 23:55 
GeneralRe: Delete query Pin
Pete O'Hanlon21-Dec-06 0:23
mvePete O'Hanlon21-Dec-06 0:23 
AnswerRe: Delete query Pin
Frank Kerrigan21-Dec-06 23:57
Frank Kerrigan21-Dec-06 23:57 
QuestionA new bie question in regards to ADO Pin
Irfan Faruki20-Dec-06 22:25
Irfan Faruki20-Dec-06 22:25 
AnswerRe: A new bie question in regards to ADO Pin
Colin Angus Mackay20-Dec-06 22:36
Colin Angus Mackay20-Dec-06 22:36 
Best approach is to write a DAL (Data Abstraction Layer). This essentially means creating a class (or group of classes) to handle your database interaction. Your application can then call the DAL class(es) rather than the database direct. At a conference I was at a couple of weeks ago one of the speakers gave some excellent advice: If you have anything from your System.Data namespace in the presentation layer (your WinForm or WebForm class, or control classes, etc.) then there is something wrong with the design.

In the DAL class(es) you connect to the database, perform your query, close the connection and return the data.

The way I do it is that each public method in the DAL is a proxy for a stored procedure in the database.

Remember that you can send pretty much and SQL into a SqlCommand. So if you can do it in Query Analyser or SQL Server Management Studio, then you can issue it via a SqlCommand (Just Remember that GO splits the batch, and that isn't supported - you must only issue one batch at a time, but you can have as many SQL Commands as you like in a batch)

Does this help?


Upcoming Scottish Developers events:
* Glasgow: Tell us what you want to see in 2007


My: Website | Blog | Photos

GeneralRe: A new bie question in regards to ADO Pin
Mairaaj Khan21-Dec-06 0:43
professionalMairaaj Khan21-Dec-06 0:43 
GeneralRe: A new bie question in regards to ADO Pin
Colin Angus Mackay21-Dec-06 1:58
Colin Angus Mackay21-Dec-06 1:58 
GeneralRe: A new bie question in regards to ADO Pin
Pete O'Hanlon21-Dec-06 2:39
mvePete O'Hanlon21-Dec-06 2:39 
AnswerRe: A new bie question in regards to ADO Pin
Irfan Faruki21-Dec-06 4:25
Irfan Faruki21-Dec-06 4:25 
AnswerRe: A new bie question in regards to ADO Pin
Frank Kerrigan22-Dec-06 0:00
Frank Kerrigan22-Dec-06 0:00 
QuestionDoubt Regarding Sqldmo View Pin
ruparanju20-Dec-06 22:19
ruparanju20-Dec-06 22:19 
QuestionReturn two values Pin
DanB198320-Dec-06 11:59
DanB198320-Dec-06 11:59 
AnswerRe: Return two values Pin
Colin Angus Mackay20-Dec-06 22:39
Colin Angus Mackay20-Dec-06 22:39 
GeneralRe: Return two values Pin
DanB198321-Dec-06 0:24
DanB198321-Dec-06 0:24 
QuestionDateDiff returns in HH:MM format Pin
VK-Cadec20-Dec-06 8:22
VK-Cadec20-Dec-06 8:22 
AnswerRe: DateDiff returns in HH:MM format Pin
Colin Angus Mackay20-Dec-06 22:41
Colin Angus Mackay20-Dec-06 22:41 
Questionproblem getting sum of each row Pin
xoxoxoxoxoxox20-Dec-06 6:13
xoxoxoxoxoxox20-Dec-06 6:13 
AnswerRe: problem getting sum of each row Pin
ednrgc20-Dec-06 6:25
ednrgc20-Dec-06 6:25 
GeneralRe: problem getting sum of each row Pin
xoxoxoxoxoxox20-Dec-06 6:50
xoxoxoxoxoxox20-Dec-06 6:50 
AnswerRe: problem getting sum of each row Pin
Keith Malwitz20-Dec-06 6:41
Keith Malwitz20-Dec-06 6:41 
AnswerRe: problem getting sum of each row Pin
RinkRat20-Dec-06 6:59
RinkRat20-Dec-06 6:59 
Questionlink the foxpro(.dbf) table with mssql Pin
Guru_yogi20-Dec-06 1:12
Guru_yogi20-Dec-06 1:12 

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.