InlineTDS

This is a discussion on InlineTDS within the PHP Language forums, part of the PHP Programming Forums category; In the ongoing saga to get FreeTDS and/or ODBC to work in PHP/Linux, connecting to a remote MS ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-25-2003
Google Mike
 
Posts: n/a
Default InlineTDS

In the ongoing saga to get FreeTDS and/or ODBC to work in PHP/Linux,
connecting to a remote MS SQL Server 2K system...

I decided to try InlineTDS...

I downloaded InlineTDS from http://library.freeodbc.org/ and put the
..so file in /usr/lib. I then added this to my /etc/odbcinst.ini...

[InlineTDS]
Description =
Driver = /usr/lib/odbc-i02.so
Setup = /usr/lib/libodbcmyS.so
FileUsage = 1
CPTimeout =
CPReuse =

....and this to my /etc/odbc.ini...

[odbc2test]
Description = InlineTDS
Driver = InlineTDS
Server = 40.40.40.40
Database = pubs
Port = 1433
Socket =
Option =
Stmt =

....from there, I was able to do...

isql odbc2test sa ''

....and then "select * from authors"...

It worked. I could also pull it open in Tora by connecting to
localhost and setting the database to "odbc2test". That piped to
localhost and then back out to the remote SQL Server.

I could also use ODBCConfig to see the settings were in there
properly.

So, if isql worked, then PHP should surely work with the following,
shouldn't it? I mean, isql is just one knotch above the tsql tool, I
thought.

$conn = odbc_connect('odbc2test','sa','');

....this didn't error out, and proceeds to the next statement just
fine...

$rows = odbc_exec($conn, 'select * from authors');

....but then halts there without an error, and without processing any
more lines -- even echoes -- beneath that line.

I guess you can't get there from PHP. MS SQL and PHP/Linux just don't
seem to mix.

Man, this sucks.
Reply With Quote
  #2 (permalink)  
Old 11-25-2003
Terence
 
Posts: n/a
Default Re: InlineTDS

Google Mike wrote:

> Man, this sucks.


Yeah, that's a bugger :/

As a last resort, can you connect to another ODBC datasource (not based
on MSSQL) which has linked tables to your MSSQL database -- ie, Access.

Alternatively (again, a last resort), you could use XML-RPC to talk to a
PHP installation running on the MS-SQL machine. This would be quite
expensive in terms of performance.

Reply With Quote
  #3 (permalink)  
Old 11-25-2003
Terence
 
Posts: n/a
Default Re: InlineTDS

Terence wrote:

> Google Mike wrote:
>
>> Man, this sucks.

>
>
> Yeah, that's a bugger :/
>
> As a last resort, can you connect to another ODBC datasource (not based
> on MSSQL) which has linked tables to your MSSQL database -- ie, Access.
>
> Alternatively (again, a last resort), you could use XML-RPC to talk to a
> PHP installation running on the MS-SQL machine. This would be quite
> expensive in terms of performance.
>


How bad do you need this?

I could maybe write you a little socket service using C# which takes
query strings and relays them to the SQL server, returning the results
in serialised XML (a string).

Reply With Quote
  #4 (permalink)  
Old 11-25-2003
Jay Grubb
 
Posts: n/a
Default Re: InlineTDS

I've got some help for you. Visit iodbc.org. There is an SDK with
instructions on how to get it integrated with PHP. The SDK will work
with FreeTDS.

The site is the Open Source side of Openlink Software. We have a SQL
server driver that you can get a free download for trial and help
installing and configuring it. Ours is commonly used for PHP-MSSQL
access.



Terence <tk.lists@fastmail.fm> wrote in message news:<3fc2f886@herald>...
> Terence wrote:
>
> > Google Mike wrote:
> >
> >> Man, this sucks.

> >
> >
> > Yeah, that's a bugger :/
> >
> > As a last resort, can you connect to another ODBC datasource (not based
> > on MSSQL) which has linked tables to your MSSQL database -- ie, Access.
> >
> > Alternatively (again, a last resort), you could use XML-RPC to talk to a
> > PHP installation running on the MS-SQL machine. This would be quite
> > expensive in terms of performance.
> >

>
> How bad do you need this?
>
> I could maybe write you a little socket service using C# which takes
> query strings and relays them to the SQL server, returning the results
> in serialised XML (a string).

Reply With Quote
  #5 (permalink)  
Old 11-25-2003
Google Mike
 
Posts: n/a
Default Re: InlineTDS

Terence <tk.lists@fastmail.fm> wrote:
>
> How bad do you need this?
>
> I could maybe write you a little socket service using C# which takes
> query strings and relays them to the SQL server, returning the results
> in serialised XML (a string).


Thanks. I once wrote an old VB6 socket service for a Telnet server
that would work pretty well for this. I'd just convert it to do
something different. I'm hoping I don't have to go down this avenue,
though, because I'd love to stick with TDS, the native protocol for
interacting with SQL Server.
Reply With Quote
  #6 (permalink)  
Old 11-25-2003
Google Mike
 
Posts: n/a
Default Re: InlineTDS

jgrubb@openlinksw.com (Jay Grubb) wrote:
> I've got some help for you. Visit iodbc.org. There is an SDK with
> instructions on how to get it integrated with PHP. The SDK will work
> with FreeTDS.
>
> The site is the Open Source side of Openlink Software. We have a SQL
> server driver that you can get a free download for trial and help
> installing and configuring it. Ours is commonly used for PHP-MSSQL
> access.


Thank you, thank you, thank you. I will look into it! I have avoided
iodbc simply because I was sort of getting somewhere at commandline
with unixODBC.
Reply With Quote
  #7 (permalink)  
Old 11-26-2003
Google Mike
 
Posts: n/a
Default Re: InlineTDS

jgrubb@openlinksw.com (Jay Grubb) wrote in message:
> I've got some help for you. Visit iodbc.org. There is an SDK with
> instructions on how to get it integrated with PHP. The SDK will work
> with FreeTDS.
>
> The site is the Open Source side of Openlink Software. We have a SQL
> server driver that you can get a free download for trial and help
> installing and configuring it. Ours is commonly used for PHP-MSSQL
> access.


Sounds great, but it costs $549 for the driver for 5 concurrent users,
$999 for 10 concurrent users, $2499 for 25 concurrent users, and $3499
for unlimited users (USA prices on 11/26/2003). I wish you luck with
other customers, because I believe in capitalism, but I'm going to see
if I can't go the free route.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:52 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0