It seems that odbc_open and odbc_import are completing successfully. The code I
sent *is* the entire program, with the name of the tables changed for security
reasons, although I've kept the case where appropriate.
Again, the program I have is:
:- auto_table.
:- import odbc_open/3 from odbc_call.
:- import odbc_import/2 from odbc_call.
:- import odbc_close/0 from odbc_call.
:- odbc_open('MySource_Name','Username','Password').
:- odbc_import('DB.TABLENAME'('attribute_1', 'attribute_2'), tablename).
And the answer is:
[program_name loaded]
ERR - ODBC: Table doesn't have attribute (Table = DB.TABLENAME,Attribute =
attribute_1)
yes
: ?-
I'm sorry that I cannot send my database (it's classified). Could it be that the
problem is on the database side? Some weird table attribute? A problem with MS
SQL Server 2005?
I have been able to successfully execute the above program with another
database, where the table's names and attributes were different, with MySQL.
Thank you again for all your comments,
Hugues
On Fri, Sep 28, 2007 at 03:52:57PM -0400, David Warren wrote:
> Hugues Demers writes:
> > Hum, it answered no.
>
> Not even a warning? Hmmm. If it's doing what I think it should be
> doing, then that would mean that no odbc_import has been successfully
> done. But I would have thought that with your:
>
> :- odbc_open('MySource_Name','Username','Password').
> :- odbc_import('DB.TABLENAME'('attribute_1', 'attribute_2'), tablename).
>
> there would have been some complaint, of either the odbc_open not
> completing or the odbc_import not completing.
>
> Maybe you can give us exactly what the entire program is, and exactly
> what you entered and what it responded.
>
> (I would eliminate the :- auto_table. command. That is a little
> suspicious with the ODBC interface, but should be OK, I would
> think...)
>
> -David
--
Hugues Demers
Staff Member
R&D Department
Lockheed Martin Canada
514-340-8310 ext. 8673
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
|