Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

So I using access database(*mdb). This my code and success to connect:

$db['test']['hostname'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:labla.mdb';
$db['test']['username'] = '';
$db['test']['password'] = '';
$db['test']['database'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:labla.mdb';
$db['test']['dbdriver'] = 'odbc';
$db['test']['dbprefix'] = '';
$db['test']['pconnect'] = TRUE;
$db['test']['db_debug'] = TRUE;
$db['test']['cache_on'] = FALSE;
$db['test']['cachedir'] = '';
$db['test']['char_set'] = 'utf8';
$db['test']['dbcollat'] = 'utf8_general_ci';
$db['test']['swap_pre'] = '';
$db['test']['autoinit'] = TRUE;
$db['test']['stricton'] = FALSE;

And now I want to using accessdb from other computer. This accessdb(*mdb) has been shared and I make map network drive(Z:).

So I was change hostname and database but its failed:

$db['test']['hostname'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=Z:labla.mdb';
$db['test']['database'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=Z:labla.mdb';

And I try this to:

$db['test']['hostname'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=\10.0.0.107sharelabla.mdb';
$db['test']['database'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=\10.0.0.107sharelabla.mdb';

But it still error:

Unable to connect to your database server using the provided settings.
Filename: D:folderfoldersystemdatabaseDB_driver.php

Line Number: 124

and even i try to connect with php and this is the result php using msaccess

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
300 views
Welcome To Ask or Share your Answers For Others

1 Answer

The problem is that the default IIS IUSER cannot access files over a network share. the workaround is detailed here: http://support.microsoft.com/kb/207671.

I would highly recommend using SQL Server (Express Edition if nothing else) than an access file - you will get a much improved experience + you will be able to migrate easier as the site expands if needed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...