Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do all ASP-capable servers have database functionality?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm building an ASP app that will need to save and load to file. I want the app to be accessable to everyone with limited knowledge of setting up the script on their website. I was wondering - what percentage of ASP-capable servers out there have database functionality?

Many thanks,
Simon
 
I'd guess they're ALL "capable." Are you talking about stuff like the ChiliSoft add-in for Apache vs. IIS, or are you asking "how many IIS users have a database installed that their web server can connect to?"

The biggest problem you're going to have is WHICH database they have. I your application is simple enough you MIGHT come up with generic enough ADO and SQL syntax to make it somewhat database-portable, assuming you rely on System DSNs or the user configuring connection strings (bleh!).

If this is to be an MS-only solution you could package MSDE as part of your install package - assuming you have VS 6 (and thus redistribution rights). Of course MSDE may not handle the volume users might have, but they could then substitute SQL Server with little or no change to script code.
 
You could use an external file to set up the database connection, e.g. file called db_connect.asp:

<%Set Conn = Server.CreateObject (&quot;ADODB.Connection&quot;)
Conn.Open &quot;DRIVER={SQL Server};SERVER=localhost;UID=username;PWD=password&quot;%>

and do an include on all the pages which need to use it:

<!--#INCLUDE FILE=&quot;db_connect.asp&quot;-->

so if someone else uses a different database, they only need to change the connection string in db_connect.asp.

You could even provide db_connect.asp's for all the major databases. C:\DOS:>
C:\DOS:>RUN
RUN DOS RUN!!
 
That presumes you can use all the same SQL statements and ADO methods for any given database.
 
I believe even NT4 comes with MDAC 1.5 out of the box.

ADO is a part of MDAC, and is what s commenly used to &quot;connect&quot; a Database in ASP.

- J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top