Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: a special kind of operator Pin
David Stone8-Nov-03 6:45
sitebuilderDavid Stone8-Nov-03 6:45 
GeneralRe: a special kind of operator Pin
MultiThread8-Nov-03 6:57
MultiThread8-Nov-03 6:57 
GeneralRe: a special kind of operator Pin
WillemM8-Nov-03 23:38
WillemM8-Nov-03 23:38 
GeneralRe: a special kind of operator Pin
David Stone9-Nov-03 5:26
sitebuilderDavid Stone9-Nov-03 5:26 
GeneralInstaller Project Pin
tkemory8-Nov-03 2:30
tkemory8-Nov-03 2:30 
GeneralRe: Installer Project Pin
MultiThread8-Nov-03 5:37
MultiThread8-Nov-03 5:37 
GeneralRe: Installer Project Pin
tkemory8-Nov-03 7:08
tkemory8-Nov-03 7:08 
GeneralDatabase access - in general Pin
mirano8-Nov-03 0:28
mirano8-Nov-03 0:28 
Hi guys,

I would like to hear you opinion about writing the code for database access in general. I have like 15 books that discuss database access, have read numerous articles, but I am still not sure of the best practices in this area. There are many solution to this and they all work, different authors offer different approaches, but it is just too time consuming.
I make client applications to access data from SQL server, and as I said I am writing too much code for that. I mean it works, but I should be able to code in shorter period of time. Some common approaches, and my opinion:
1. Use of MS application blocks: this is not such a big help, if I call the stored procedures in one line of code, or 5, it is all same to me, cause I auto-generate it anyways.
2. Use of different data access layers: they all are too complicated, and it only adds to the complicity of my code. I do not need such approach so that I can be flexible to easily switch my code from accessing SQL server to accessing Oracle, or anything like that, cause I will never be doing that.
3. Use of binding context: this is the biggest crap I have seen in .Net. It is not flexible at all, have to basically make binding context for each different control on the form, have no control over the process, very hard to keep grid and controls data in sync... Will never use it.

I usually make a class for each window, cause I always represent data from multiple tables, there are usually grid control, some combo boxes and number of other controls, then I handle moving through data sets and take care of inserting, updating or deleting data in data set by using appropriate methods in that class. Of course, I do it in a locally accessible data set, then I update a database, keeping the local data set view updated. This is all fine, but it takes TOO MUCH TIME to code like this for every window I need.
I just wanted to hear you opinion about this, I mean there has to be a quicker way to this.

Thanks in advance.
GeneralRe: Database access - in general Pin
WillemM8-Nov-03 5:31
WillemM8-Nov-03 5:31 
GeneralC# applet Pin
Sergiu7-Nov-03 20:30
Sergiu7-Nov-03 20:30 
GeneralRe: C# applet Pin
WillemM8-Nov-03 5:31
WillemM8-Nov-03 5:31 
GeneralRe: C# applet Pin
jparsons8-Nov-03 12:04
jparsons8-Nov-03 12:04 
GeneralRe: C# applet Pin
Sergiu9-Nov-03 20:15
Sergiu9-Nov-03 20:15 
GeneralLate Binding an ActiveX executable Pin
JL_3277-Nov-03 16:06
JL_3277-Nov-03 16:06 
QuestionHow do u change the brightness of an image in C# Pin
james4057-Nov-03 11:48
james4057-Nov-03 11:48 
GeneralPutting a fixed array of data into the database Pin
EddieSD647-Nov-03 11:16
sussEddieSD647-Nov-03 11:16 
GeneralRe: Putting a fixed array of data into the database Pin
Colin Angus Mackay7-Nov-03 14:20
Colin Angus Mackay7-Nov-03 14:20 
QuestionExternal Variables??? Pin
bscott31257-Nov-03 10:04
bscott31257-Nov-03 10:04 
AnswerRe: External Variables??? Pin
MultiThread8-Nov-03 5:51
MultiThread8-Nov-03 5:51 
GeneralRe: External Variables??? Pin
bscott31258-Nov-03 6:08
bscott31258-Nov-03 6:08 
GeneralRe: External Variables??? Pin
MultiThread8-Nov-03 6:15
MultiThread8-Nov-03 6:15 
QuestionHow do I create an app.config file?? Pin
Code Toad7-Nov-03 9:12
Code Toad7-Nov-03 9:12 
AnswerRe: How do I create an app.config file?? Pin
Colin Angus Mackay7-Nov-03 14:28
Colin Angus Mackay7-Nov-03 14:28 
GeneralReading simple XML Pin
MrEyes7-Nov-03 8:03
MrEyes7-Nov-03 8:03 
GeneralRe: Reading simple XML Pin
Mazdak7-Nov-03 8:57
Mazdak7-Nov-03 8:57 

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.