PHP and an MDB web database.... if i am working on a database that i have on my system i simply use a DSN and in PHP i use $conn = odbc_connect ('emailDSN', '', '') or die( "Could Not Connect to ODBC Database!"); but what is the PHP command to access an MDB that i have saved on the Web (e.g www.mysite.com/add_info.mdb)????
This is something I have been wondering about.. Its one thing setting up a website to run off IIS but I have no clue how a local DSN would work online :spangled:
I'm probably gonna be buying some webspace between 2night and friday.. so I'll let u know what the crack is. If I can decipher it..
Finally got round this.. In your page simple add an include file such as - then inside that include file add a connection string like so - Then reference to this connection in your code before attempting a sql statement - It seems to work for me. I was using a local DNS to text out the site I was developing for a project.. but thought how the hell was I gonna get it to work on the lecturers machine when hes trying to grade it, as it won't have my local DNS configured on it. Therefore by using this method, possibly with an app.path line, you can set up the site to access the database from where you tell it to, withoutthe requirement for a DNS. I ended up with this as my starting code for one of the pages - This reads the include file and uses strConnect as the activeconnection to run the SQL statement. I'm using asp to do this though.. might be different in PHP but you get the general idea..