RE: How do I include a file



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
.



Relevant Pages

  • C# ADO MD Error
    ... I'm trying to do some ADO MD programming. ... hitting two errors which seem to be separate issues so I've posted them ... If I use a regular SQL Server connection string, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Error - Could not find installable ISAM
    ... You can use the Universal Data Link (UDL) dialog to point and click your way ... and copy and paste the connection string into your code. ... "Dave" wrote in message ... >>> I am just trying to connect to an Access database on my local IIS ...
    (microsoft.public.data.ado)
  • Re: Easy One ....I think....
    ... Dave:) ... Doable, but not particularly easy, as you have the data in 6 separate ... Consider making one table (one sheet) with all this data. ... multiple workbooks, but the principle is the same. ...
    (microsoft.public.excel)
  • Re: Firewire external hardrive trouble
    ... >> He said nothing about a firewall, Dave. ... > Yes, he did in a separate, but nearly identical, message posted at 1 ... It might be easier to think of Firewire as "IEEE ...
    (comp.sys.mac.hardware.misc)
  • Re: DAO 3.51
    ... recordsets but DAO seems quite content with recordsets (unless there is a ... "Every problem needs a fast and efficient solution" ... "Dave O." ... I'm using a standard connection string. ...
    (microsoft.public.vb.general.discussion)