473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

PHP & Attunity Connect problem

I am trying to connect to a legacy system running on VMS using the
Attunity Connect ODBC driver from within PHP. I know the System DSN
works because SQL Server has been using it successfully for years. I
want to access the info on VMS from within PHP and this is when all
goes pear shaped!

I have tried various ways...

1) If I am in query analyser and type 'SELECT * FROM
DNSNAME...TABLENAME' etc. This works fine. But if I try putting this
within a SQL string within PHP I get the following error..
"Hetrogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options
to be set for the connection. This ensures consistent query
semantics.....
Varies postings relating to this very message appear on groups, most of
which state to set these ANSI variables and try again. I have but still
no joy!

2)From within PHP just create a normal ODBC connection, refere to the
DSN in question and try a query such as:-

<?php

$link_id = odbc_connect ('DSNNAME','','');//Links to database

if ($link_id){
echo "connected to DSNNAME!!<br>";
$sql = "SELECT top 10 proj_name, area
FROM projects";
$exec = odbc_exec($link_id, $sql);
}

if ($exec)
{
echo "selection completed<br>";
while ($row = odbc_fetch_row ($exec))
echo $row->id."<br>";
}
else
echo "ERROR - connecting to DSNNAME!!";
?>
This also fails, with the following message...
SQL error:[Attunity][Attunity Connect Driver][A077]DS Name DSNNAME does
not appear in the binding entry.,SQL state S1000 in SQLConnect in
d:\intranet\test scripts\dsntest.php

As a final straw I tried connecting by using the method....
$conn = new COM('ADODB.Connection');
$conn->open("DRIVER={Attunity Connect Driver}).... etc....

No diffrent....

I can connect to a simple Access database by setting up an ODBC
source...
So there seems to be an issue between PHP and the Attunity Driver, and
I am now officially annoyed....

Has anyone else tried a similar combination because I would desperately
like to chat with you!

Jul 17 '05 #1
2 3522
I'm trying to use Attunity Connect on PHP/Linux too (Debian).
Have you solve your problem ? If yes, a little help would be
appreciate :)

I think you can't put an URL in the DSN. You have to use a software
like unixodbc to configure an ODBC link. Then, in your web page, you
must point on your ODBC link.

I tried on a Windows Host, with succes. I installed an Attunity Sdudio
on my machine, and made an ODBC link 'Tolas'.
In my PHP page, I used the DSN : "odbc://Tolas"

Now, for Linux, I have absolutely no idea on how to do :'(
http://eye.cc -php- web design
Jul 17 '05 #2
Hi glad to hear from you... Hope your still viewing the post, I almost
forgot about it myself!

I would be interested in seeing a code example of how you got it
working in a Windows environment, as I thought I had done exactly as
you did.

Was there and special settings in the ini file?
I can't see anything there that iv'e missed.

I'me afraid my situation is pure Windows and not Linux, so don't think
I can help you on that one. I assumed the problem to be because the
ODBC link is referencing a seperate VMS machine, however collegues of
mine use the very same ODBC link through VB and ASP! I figured there
was something dodgy with PHP. Anyhow I will revisit the problem today.
If you do get to the bottom of your linux problem please do let me
know, as you never know which technologies are going to be thrown at
you!

Cheers
Worst wrote:
I'm trying to use Attunity Connect on PHP/Linux too (Debian).
Have you solve your problem ? If yes, a little help would be
appreciate :)

I think you can't put an URL in the DSN. You have to use a software
like unixodbc to configure an ODBC link. Then, in your web page, you
must point on your ODBC link.

I tried on a Windows Host, with succes. I installed an Attunity Sdudio
on my machine, and made an ODBC link 'Tolas'.
In my PHP page, I used the DSN : "odbc://Tolas"

Now, for Linux, I have absolutely no idea on how to do :'(
http://eye.cc -php- web design


Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: ian justice | last post by:
Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious cause to the following problem. For the moment i've...
1
by: Rick | last post by:
Hi, A while ago someone helped with me by providing code to connect with another url. The problem is, that won't work for a applet because of some permissions. There's that policy tool so I used...
4
by: Lorenzo | last post by:
hi you all, first of all apologies for having cross-posted this message but really i did not know where to post it. please let me know what ng you consider the most suitable for the described...
1
by: flupke | last post by:
Hi, i'm trying to convert my java console app to a python gui. Now, the only problem i seem to have at the moment are the resizers for the layout. It seems that for the purpose of what i'm...
1
by: C.O.Jones | last post by:
Using Oracle 8.1.7 Personal edition on Windows XP. I was experimenting with the DBA tools. I first of all tried to adjust the memory used by my database. Then I attempted to shutdown and...
4
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
11
by: atlaste | last post by:
Hi, In an attempt to create a full-blown webcrawler I've found myself writing a wrapper around the Socket class in an attempt to make it completely async, supporting timeouts and some scheduling...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.