![]() |
odbc connection to a remote system - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: odbc connection to a remote system (/showthread.php?tid=14179) Pages:
1
2
|
odbc connection to a remote system - El Forum - 12-21-2008 [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-guide/database/connecting.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 odbc connection to a remote system - El Forum - 12-22-2008 [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 ? odbc connection to a remote system - El Forum - 12-22-2008 [eluser]Henry Weismann[/eluser] Are you setting those settings in the database.php config file? Also where is the query and for each? odbc connection to a remote system - El Forum - 12-22-2008 [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 odbc connection to a remote system - El Forum - 12-22-2008 [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'; odbc connection to a remote system - El Forum - 12-22-2008 [eluser]Waiel[/eluser] Thanks Henry but it give the error Code: An Error Was Encountered odbc connection to a remote system - El Forum - 12-22-2008 [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 />"; odbc connection to a remote system - El Forum - 12-22-2008 [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 ! odbc connection to a remote system - El Forum - 12-22-2008 [eluser]Henry Weismann[/eluser] Try making the port a string. odbc connection to a remote system - El Forum - 12-22-2008 [eluser]Waiel[/eluser] Still no luck .. this is driving me crazy >< |