database connections (Full Version)

All Forums >> [Web Development] >> Server Issues



Message


walrus -> database connections (4/4/2006 17:48:31)

Please start me off in (any) direction.

I have a few websites on the same server produced from FP2003 with an access database. I would like to connect all the websites to one central database on one of the sites. I have tried using the wizard on TOOLS>SITESETTINGS>DATABASE but with no success, as I don't know much about this type of connection. The host will allow a connection without DSN and has given me the path to where the database.mdb is located.
D:/secure/etc...

Do I amend the global.asa file? or what...

Let me know if you need more information.

Thanks




yb2 -> RE: database connections (4/16/2006 13:21:38)

Look into OLEDB connections, you can put the 3 or 4 lines of code into a file and then INCLUDE it on any page it's needed. You could even put the Include file in a directory where all your sites could access it, and then any changes could be made in one place?

<%
Dim myConn
Set myConn = Server.CreateObject("ADODB.Connection")
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\secure\etc\yourDB.mdb"
myConn.Open strConnString
%>


I don't know how this will fit in with the DRW stuff as I never use it, but someone will know.




walrus -> RE: database connections (4/16/2006 19:16:17)

Thanks yb2




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125