473,228 Members | 1,814 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,228 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 3517
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.