Click here to Skip to main content
15,923,376 members
Home / Discussions / C#
   

C#

 
AnswerRe: About SqlConnection String in App.config file Pin
Jasmine250123-Nov-06 21:16
Jasmine250123-Nov-06 21:16 
GeneralRe: About SqlConnection String in App.config file Pin
Russell Jones23-Nov-06 21:31
Russell Jones23-Nov-06 21:31 
GeneralRe: About SqlConnection String in App.config file Pin
Eduard Keilholz23-Nov-06 22:36
Eduard Keilholz23-Nov-06 22:36 
GeneralRe: About SqlConnection String in App.config file Pin
Jasmine250123-Nov-06 22:43
Jasmine250123-Nov-06 22:43 
GeneralRe: About SqlConnection String in App.config file Pin
Eduard Keilholz23-Nov-06 22:57
Eduard Keilholz23-Nov-06 22:57 
AnswerRe: About SqlConnection String in App.config file Pin
Colin Angus Mackay24-Nov-06 3:35
Colin Angus Mackay24-Nov-06 3:35 
Question[Message Deleted] Pin
PREMSONBABY23-Nov-06 19:59
PREMSONBABY23-Nov-06 19:59 
AnswerRe: Hi regarding ERP Pin
Jasmine250123-Nov-06 20:30
Jasmine250123-Nov-06 20:30 
(I was typing my reply when your old post disappeared! I figured it had been moved, but I had some trouble finding it. Anyway, here's what I was trying to say before.)

You're thinking a little old-skool there. I think if you take advantage of the .Net Framework, you can eliminate the middle-tier and still keep things secure. You don't want to get into COM-hell, which is not entirely eliminated with .Net assemblies. The Windows client and the SQL database are enough. Keep it simple. If you are going to store your information in a database, you won't need to serialise your objects... that's really only useful if you're using files for storage or if you really need a middle-tier. To store an object all you need is to put the current values of the member variables into columns in your database. So if you had an object like this:

class myObject {
int myNumber;
string myString;
...some functions and such...
}

You would simply create a database table like this:

create table myObject (
object_id int,
myNumber int,
myString varchar(x)
)

You need an object ID so you can make sure you don't get multiple instances mixed up. You could use any property of the object to make it unique - doesn't have to be an integer.

Then you create a stored procedure to store this object data (and perhaps send back a new unique ID), and another stored procedure to retrieve objects based on their ID. You will be able to use these stored procedures in a secure fashion from the client, and you will be able to take advantage of all kinds of cool security features designed for this exact purpose, and all your validation can be performed on either of (or both of) the two layers. As long as you're not doing super-complex math or predicting the weather or something, you should be able to push all the validation down to the database layer. That is the way to go if you suspect multiple versions of the client, but if you have total control over client updates, then you are safe doing that stuff on the client and avoiding a round trip to some server somewhere. I've just finished a very complex application that uses this model - there was no reason for a middle tier. You haven't given any reason why you really need that.

"Quality Software since 1983!"
http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps!

General[Message Deleted] Pin
PREMSONBABY23-Nov-06 23:20
PREMSONBABY23-Nov-06 23:20 
GeneralRe: Hi regarding ERP Pin
Jasmine250124-Nov-06 19:45
Jasmine250124-Nov-06 19:45 
QuestionDevexpress Mask Editor Pin
praveenqwe23-Nov-06 19:56
praveenqwe23-Nov-06 19:56 
Questionget unused port number Pin
utsav turray23-Nov-06 19:50
utsav turray23-Nov-06 19:50 
AnswerRe: get unused port number Pin
Shajeel23-Nov-06 20:16
Shajeel23-Nov-06 20:16 
QuestionDate Validation Pin
Deepasubramanian23-Nov-06 19:27
Deepasubramanian23-Nov-06 19:27 
Questionredirecting the contents of command promt to a file Pin
sanki77923-Nov-06 19:23
sanki77923-Nov-06 19:23 
QuestionUsing java script to a XML onto grid view Pin
ah_jiang_923-Nov-06 18:54
ah_jiang_923-Nov-06 18:54 
AnswerRe: Using java script to a XML onto grid view Pin
Benoy Bose23-Nov-06 19:33
Benoy Bose23-Nov-06 19:33 
Questionhow to open a folder in a designated location Pin
Shirley, Wang23-Nov-06 18:14
Shirley, Wang23-Nov-06 18:14 
AnswerRe: how to open a folder in a designated location Pin
Eduard Keilholz24-Nov-06 5:12
Eduard Keilholz24-Nov-06 5:12 
Questionhow to override ondatabinding in case of binding data to datagrid Pin
333soori23-Nov-06 17:54
333soori23-Nov-06 17:54 
AnswerRe: how to override ondatabinding in case of binding data to datagrid Pin
Jasmine250123-Nov-06 20:57
Jasmine250123-Nov-06 20:57 
Questiondrag and drop issue... Pin
Super Lloyd23-Nov-06 16:44
Super Lloyd23-Nov-06 16:44 
AnswerRe: drag and drop issue... Pin
Weckmann23-Nov-06 22:16
Weckmann23-Nov-06 22:16 
GeneralRe: drag and drop issue... Pin
Super Lloyd23-Nov-06 22:25
Super Lloyd23-Nov-06 22:25 
GeneralRe: drag and drop issue... Pin
Weckmann23-Nov-06 23:28
Weckmann23-Nov-06 23:28 

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.