Click here to Skip to main content
15,917,059 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do I open an aboutbox and close it Pin
User 665822-Feb-06 7:10
User 665822-Feb-06 7:10 
GeneralRe: How do I open an aboutbox and close it Pin
delphidab22-Feb-06 7:24
delphidab22-Feb-06 7:24 
GeneralRe: How do I open an aboutbox and close it Pin
Dan Neely22-Feb-06 7:28
Dan Neely22-Feb-06 7:28 
GeneralRe: How do I open an aboutbox and close it Pin
delphidab22-Feb-06 7:44
delphidab22-Feb-06 7:44 
GeneralRe: How do I open an aboutbox and close it Pin
User 665822-Feb-06 7:31
User 665822-Feb-06 7:31 
GeneralRe: How do I open an aboutbox and close it Pin
delphidab22-Feb-06 7:42
delphidab22-Feb-06 7:42 
QuestionTool to generate C# code for talking to SQL? Pin
Judah Gabriel Himango22-Feb-06 6:44
sponsorJudah Gabriel Himango22-Feb-06 6:44 
AnswerRe: Tool to generate C# code for talking to SQL? Pin
Colin Angus Mackay22-Feb-06 11:21
Colin Angus Mackay22-Feb-06 11:21 
Judah Himango wrote:
// I sure hope the database guy doesn't change the stored proc name, or I'll be screwed!

Judah Himango wrote:
// I sure hope the database guy doesn't change this stored proc parameter, or I'll be screwed!

Judah Himango wrote:
// I sure hope the DBA doesn't modify the return type, or I'm screwed!


It sounds like the problem is more to do with team communication rather than ADO.NET. Would you like to suggest a way of working where your code would not be screwed by someone changing the stored procedure name, the parameters or the return type?

Judah Himango wrote:
// Oh, great, boxing! Thanks ADO.NET!


How would you suggest it is done? Given the roundtrip time of calling a stored procedure on a database the additional time it takes to box this value is negligable. When running a SQL Command you have much greater performance problems to worry about than that piddling little thing.

Judah Himango wrote:
All this for calling a single stored procedure! And refactoring -- refactoring is tedious because all the code is strings.


I write a DAO (Data Access Object) class to wrap this up neatly. Most of my public methods are just one or two lines long. All the rest is common enough to be sent to private methods to be called from the public one.

I've also experimented with using reflection to work out what should be built as I use a cradle-to-grave naming convention and my DAO class acts as a proxy to the stored procedures, so its public interface is basically a C# representation of the stored procedures.

Judah Himango wrote:
So I was hoping one of you might know of some tool that either generates code like this automatically, and/or checks for the validity of code against a stored procedure.


I've not yet found a code gen tool that solved more problems than it created.

ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?

GeneralRe: Tool to generate C# code for talking to SQL? Pin
Judah Gabriel Himango22-Feb-06 12:27
sponsorJudah Gabriel Himango22-Feb-06 12:27 
QuestionWeb service that accesses an Access database with input from/output to a web app? Pin
Red_Wizard_Shot_The_Food22-Feb-06 6:31
Red_Wizard_Shot_The_Food22-Feb-06 6:31 
Questionadding arrows to buttons Pin
Dsypher22-Feb-06 6:30
Dsypher22-Feb-06 6:30 
AnswerRe: adding arrows to buttons Pin
Alomgir Miah22-Feb-06 7:44
Alomgir Miah22-Feb-06 7:44 
GeneralRe: adding arrows to buttons Pin
Dsypher22-Feb-06 15:24
Dsypher22-Feb-06 15:24 
Questionuninstall in remote system Pin
sendmadhavan22-Feb-06 5:35
sendmadhavan22-Feb-06 5:35 
Questiongarbage collection Pin
zhujp9822-Feb-06 5:25
zhujp9822-Feb-06 5:25 
AnswerRe: garbage collection Pin
Judah Gabriel Himango22-Feb-06 6:23
sponsorJudah Gabriel Himango22-Feb-06 6:23 
AnswerRe: garbage collection Pin
Guffa22-Feb-06 9:16
Guffa22-Feb-06 9:16 
GeneralRe: garbage collection Pin
Colin Angus Mackay22-Feb-06 11:28
Colin Angus Mackay22-Feb-06 11:28 
GeneralRe: garbage collection Pin
Guffa22-Feb-06 11:42
Guffa22-Feb-06 11:42 
GeneralRe: garbage collection Pin
Colin Angus Mackay22-Feb-06 11:50
Colin Angus Mackay22-Feb-06 11:50 
QuestionConvert String to decimal Pin
cppdotnet22-Feb-06 3:51
cppdotnet22-Feb-06 3:51 
AnswerRe: Convert String to decimal Pin
Judah Gabriel Himango22-Feb-06 4:10
sponsorJudah Gabriel Himango22-Feb-06 4:10 
GeneralRe: Convert String to decimal Pin
cppdotnet22-Feb-06 4:16
cppdotnet22-Feb-06 4:16 
GeneralRe: Convert String to decimal Pin
Judah Gabriel Himango22-Feb-06 4:29
sponsorJudah Gabriel Himango22-Feb-06 4:29 
GeneralRe: Convert String to decimal Pin
Dan Neely22-Feb-06 4:37
Dan Neely22-Feb-06 4:37 

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.