| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Database password in an external file !!!
Hello,
I would like to know something about placing a password for a database in an external file, something like a global.asa file or a included file. I'm using an access database and ASP. So my question is how do I make this file and how do I attach it to my website. I thought this might be useful for extra database security, is this true? The database is located in a folder that is protected by the hosting provider and you can only download the database using a login name and password and you can change data trough webpages (update, delete and insert). This has all about database security, I want to make my database as secure as possible, I'm already using SSL certificates. I don't know much about this security so some help could be useful. I hope someone can help me out here. Thanks Zoe-Alyssa |
|
#2
|
|||
|
|||
|
If you are using ASP with VBScript you can use code similar to this. Type in the adovbs.inc in google to download the info. This is needed for mdbs.
<% Dim oConn, oRS, oCmd, strConnectionString, strDriver %> <% strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("databasename.mdb") & ";Jet OLEDB Set oConn = Server.CreateObject("ADODB.Connection") Set oRS = Server.CreateObject("ADODB.Recordset") Set oCmd = Server.CreateObject("ADODB.Command") %> Then name this file something like connection.inc. Here is a sample of what it would look like: <@% Language=VBScript %> <%Option Explicit %> ' for making sure variables are defined <% your code here %> <html> <head> <title>My Database Page</title> </head> <body> </body> </html> Very basic, but hope it helps. |
![]() |
| Viewing: Tutorialized Forums > Databases > DB Design > Database password in an external file !!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|