RE: How do I include a file
- From: "TarteredSalmon" <TarteredSalmon@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 Aug 2005 11:27:16 -0700
I don't know why you'd want to have the connection string file on a separate
application directory, but I have done it on a different file (on the same
directory) .Here is what I have done.
I have a log in page that validates username and password from the SQL
server database (don't worry, all passwords are encrypted), so I created a
separate C# file that has a class to connect to the db. On my login page, I
created an object of the class and wala, you are ready to go.
Chao...
Now, I don't know how secure that is (I am sure some of the pundits here
will be able to answer that question), but that's my approach.
"Dave" wrote:
> Everyone keeps telling me that I should protect my database connection
> information by defining the connection string in a separate file (presumably
> one that is not in the application directory).
> However, I can't work out how to do this as C# doesn't seem to have an
> equivelant of the C/C++ #include directive.
> Can someone give me the clue.
> --
> Dave
.
- References:
- How do I include a file
- From: Dave
- How do I include a file
- Prev by Date: Re: NullReferenceException inside using statement
- Next by Date: Re: VC# 2005 Express Windows Forms: Replacing parameters in a text file with values from textboxes
- Previous by thread: Re: How do I include a file
- Next by thread: Process Question
- Index(es):
Relevant Pages
|