A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; Waterfall_Cache has a deprecated constructor

Filename: _common/waterfall_cache.php

Line Number: 47

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; Cache_System has a deprecated constructor

Filename: _common/waterfall_cache.php

Line Number: 194

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; Memcache_Cache_System has a deprecated constructor

Filename: _common/waterfall_cache.php

Line Number: 275

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; Filesystem_Cache_System has a deprecated constructor

Filename: _common/waterfall_cache.php

Line Number: 440

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; APC_Cache_System has a deprecated constructor

Filename: _common/waterfall_cache.php

Line Number: 628

File DSN's Page 3

File DSN's Page 3


Download the authoritative guide: Data Center Guide: Optimizing Your Data Center Strategy

Download the authoritative guide: Cloud Computing: Using the Cloud for Competitive Advantage

To use the file DSN is as simple as building a connection string giving the file DSN name and building the database source.

'First create the connection object
Set oconnect = Server.CreateObject("ADODB.Connection")

'Next I map a path to a virtual directory containing all my databases
'This saves time moving the application from a local to a remote server, the
'Physical paths can change, but the virtaul remain the same. Server.MapPath returns
'A physical path from a virtual directory.
DB_PATH = SERVER.MAPPATH("/DATABASE")

'Next build a connection string using the file DSN we created and
'The mapped path to the database directory with the database we want to connect to

CONNECT_STR = "FILEDSN=WEB.DSN;" & _
                 "DBQ=" & DB_PATH & "\WEBDB.MDB;"

'Now connect as normal and your done
oconnect.Open CONNECT_STR

That's all there is to it!

This article was originally published on Jan 25, 1999
Page 3 of 3

Thanks for your registration, follow us on our social networks to keep up-to-date