odbc connection to a remote system |
[eluser]Waiel[/eluser]
Hi, i have a project I'm working on it which requires accessing multiple DB on different servers the Database are Microsoft Access Database. so i followed the user guide http://ellislab.com/codeigniter/user-gui...cting.html but i was unable to successfully connect. does the ODBC uses a special port ? Please note the web server is a Unix based system while the Database servers are all windows Thanks
[eluser]Waiel[/eluser]
Ok here is an update i used a program called odbc bridge which allowed the odbc to be available over the network on a specific port as i need when i do a "telnet dbserver port " i connects so it's available in my example the server ip is 192.168.1.3 and the port i set is 8888 so telnet 192.168.1.3 8888 will establish a connection Now in CI it doesn't run any query nor display anything it just shows a blank page ... here is the configuration i used Code: $dbs['hostname'] = '192.168.1.3'; so anyone have any idea what i'm doing wrong ?
[eluser]Henry Weismann[/eluser]
Are you setting those settings in the database.php config file? Also where is the query and for each?
[eluser]Waiel[/eluser]
No i'm setting this inside the controller as i'm going to have to connect to multiple servers at the same time the main database is Mysql set in the database.php here is the full controler file user.php Code: class Users extends Controller { it's just a test to see if it's going to connect
[eluser]Henry Weismann[/eluser]
I am assuming your database either does not have a username or password or you left it out in your post for security reasons. Try: Code: $db['access']['hostname'] = '192.168.1.3';
[eluser]Waiel[/eluser]
Thanks Henry but it give the error Code: An Error Was Encountered
[eluser]Henry Weismann[/eluser]
Thats wierd...did you change the db config array like so: Code: $db['access']['hostname'] = '192.168.1.3'; Code: echo "Database Resource: ".$msdb."<br />";
[eluser]Waiel[/eluser]
it was my mistake i added the configuration in the controller i added to the database.php and tried it it give me the same result as before blank page .. and no connection was made to the server !
|
Welcome Guest, Not a member yet? Register Sign In |