By: edavison
Date: 2007-10-27
Time: 07:02
|
odbc/mssql with TBS
I need to query an mssql database and have been able to successfully connect with ODBC and get data back to PHP. Now I am trying this with TBS by using the following code:
$odbc = odbc_connect ('ajera', '', '') or die('Could Not Connect to ODBC Database!');
$str_query = "select * from AxProject where prjEstimatedStartDate > '2005-01-01' order by prjID"
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('odbc_conn.html') ;
$TBS->MergeBlock('blk1',$odbc,$str_query) ;
$TBS->Show() ;
odbc_close($odbc);
However, this yields the following error message:
TinyButStrong Error when merging block [blk1] : Data source Id 'odbc link' is unsupported because function 'tbsdb_odbc_open' is not found.
Am I going about this the wrong way to get to mssql?
|
By: Skrol29
Date: 2007-10-27
Time: 14:39
|
Re: odbc/mssql with TBS
ODBC is not supported in native by TBS. you need to use a database plug-in for this.
You'll found some database plug-ins at the Plug-In page.
You can also use TbsSQL which gives you more, presentation and download at the Other Tools page.
|
By: TomH
Date: 2007-10-27
Time: 20:37
|
Re: odbc/mssql with TBS
The ezSQL db plugin for TBS does support connection to mssql
ezSQL is a widget that makes it very fast and easy for you to use database(s) within your PHP scripts ( mySQL / Oracle8/9 / InterBase/FireBird / PostgreSQL / MS-SQL / SQLite / SQLite c++). |
I have been using ezSQL with TBS and it by far has greatly simplified TBS db connections for me.
Hope that helps,
TomH
|
By: edavison
Date: 2007-10-28
Time: 02:57
|
Re: odbc/mssql with TBS
Thank you all very much for the tips. I did find the odbc plugin on the plugin page and was able to get it to work. I will also look at the alternatives listed here on the other tools page as well.
|
|
Posting in progress.
Please wait...
|