G, Hemanth Kumar | 3 Jun 2009 14:57
Favicon

SQLCopyDesc returns SQL_SUCCESS instead of HY010(Function sequence error)

Hi,

         I observe SQLCopyDesc() returning SQL_SUCCESS despite returning HY010(3.0) (Function sequence error) for the below mentioned cases(state transitions).

S8 - Function needs data. SQLParamData has not been called.
S9 - Function needs data. SQLPutData has not been called.
S10 - Function needs data. SQLPutData has been called.
S11 - Still executing.
S12 - Asynchronous execution canceled.


This is what I see in msdn odbc specifications:
--------------------------------------------------------
HY010 - Function sequence error
(DM) The descriptor handle in SourceDescHandle or TargetDescHandle was associated with a StatementHandle for which an asynchronously executing function (not this one) was called and was still executing when this function was called.

(DM) The descriptor handle in SourceDescHandle or TargetDescHandle was associated with a StatementHandle for which SQLExecute, SQLExecDirect, SQLBulkOperations, or SQLSetPos was called and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns

--------------------------------------------------------

Can you correct it to returning HY010 for the cases mentioned above..

Thanks,
Hemanth

_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Nick Gorham | 3 Jun 2009 17:51
Favicon

Re: SQLCopyDesc returns SQL_SUCCESS instead of HY010(Function sequence error)

G, Hemanth Kumar wrote:
>
> Hi,
>
>          I observe SQLCopyDesc() returning SQL_SUCCESS despite 
> returning HY010(3.0) (Function sequence error) for the below mentioned 
> cases(state transitions).
>
> S8 - Function needs data.* SQLParamData* has not been called.
> S9 - Function needs data.* SQLPutData* has not been called.
> S10 - Function needs data.* SQLPutData* has been called.
> S11 - Still executing.
> S12 - Asynchronous execution canceled.
>
>
Ok, give the build on the ftp site a go now.

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

G, Hemanth Kumar | 4 Jun 2009 09:18
Favicon

Re: SQLCopyDesc returns SQL_SUCCESS insteadof HY010(Function sequence error)

I tried with the latest build and it works!!

Thanks Nick.

-----Original Message-----
From: unixodbc-dev-bounces <at> mailman.unixodbc.org
[mailto:unixodbc-dev-bounces <at> mailman.unixodbc.org] On Behalf Of Nick
Gorham
Sent: Wednesday, June 03, 2009 9:21 PM
To: Development issues and topics for unixODBC
Subject: Re: [unixODBC-dev] SQLCopyDesc returns SQL_SUCCESS insteadof
HY010(Function sequence error)

G, Hemanth Kumar wrote:
>
> Hi,
>
>          I observe SQLCopyDesc() returning SQL_SUCCESS despite 
> returning HY010(3.0) (Function sequence error) for the below mentioned

> cases(state transitions).
>
> S8 - Function needs data.* SQLParamData* has not been called.
> S9 - Function needs data.* SQLPutData* has not been called.
> S10 - Function needs data.* SQLPutData* has been called.
> S11 - Still executing.
> S12 - Asynchronous execution canceled.
>
>
Ok, give the build on the ftp site a go now.

--
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

G, Hemanth Kumar | 4 Jun 2009 13:49
Favicon

Regarding error messages coming from the driver..

Hi Nick,

      If the error comes from the driver, ideally it should take the form..
[vendor-identifier][ODBC-component-identifier][data-source-identifier]data-source-supplied-text

For example, when selected from a non-existent table 'tmp1' from Teradata datasource, Microsoft DM returns..
[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does not exist.

Using unixODBC DM, the error message takes the form
[unixODBC][Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does not exist.

I suppose, [unixODBC] not be appended for errors coming from the driver.
Correct me if I'm wrong!

Thanks,
Hemanth.

_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Nick Gorham | 4 Jun 2009 14:09
Favicon

Re: Regarding error messages coming from the driver..

G, Hemanth Kumar wrote:
>
> Hi Nick,
>
>       If the error comes from the driver, ideally it should take the 
> form..
>
*[*/vendor-identifier/*][*/ODBC-component-identifier/*][*/data-source-identifier/*]*/data-source-supplied-text/ 
>
>
> For example, when selected from a non-existent table 'tmp1' from 
> Teradata datasource, Microsoft DM returns..
> [Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does 
> not exist.
>
> Using unixODBC DM, the error message takes the form
> [unixODBC][Teradata][ODBC Teradata Driver][Teradata Database] Object 
> 'tmp1' does not exist.
>
> I suppose, [unixODBC] not be appended for errors coming from the driver.
> Correct me if I'm wrong!
>
> Thanks,
> Hemanth.
>
Yes, you are correct, but MS doesn't have the situation where there are 
other driver managers that could be in use, and apps that may be 
directly linked to drivers.

if I got a error report that was along the line of

"Your crappy unixODBC has reported

[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does 
not exist.

You need to fix it"

I could spend the next three days looking for a problem that in fact 
didn't involve unixODBC at all.

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

G, Hemanth Kumar | 5 Jun 2009 10:51
Favicon

Regarding error messages coming from the driver (and not from the driver manager)

Nick,

I might not be clear enough in representing the issue in my earlier mail. Let me try to be more clear this time..

Even Microsoft driver manager appends its vendor's name, but only for errors that come from driver manager, and not from the driver.

[Microsoft][ODBC Driver Manager] Function sequence error

But when the error comes from the driver(for e.g Teradata), I believe, it has to take the form.
[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does not exist.

I verified the same against UNIX DataDirect driver manager. Providing the same below

Using Microsoft DM
[Microsoft][ODBC Driver Manager] Function sequence error //driver manager pointing out the error and hence it's name
[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does not exist. //driver pointing out the error and hence it's name

Using DataDirect DM
[DataDirect][ODBC lib] Function sequence error  //driver manager pointing out the error and hence it's name
[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does not exist. //driver pointing out the error and hence it's name

Using unixODBC DM
[unixODBC][Driver Manager]Function sequence error //driver manager pointing out the error and hence it's name
[unixODBC][Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does not exist. //driver pointing out the error and hence it's name, but driver manager is also included

This is what I see in ODBC Programmer's reference
----------------------------
If the source of an error or warning is a component itself, the diagnostic message must explain this. Therefore, the text of messages has two different formats. For errors and warnings that do not occur in a data source, the diagnostic message must use this format:

    [vendor-identifier][ODBC-component-identifier]component-supplied-text

For errors and warnings that occur in a data source, the diagnostic message must use this format:

    [vendor-identifier][ODBC-component-identifier][data-source-identifier]data-source-supplied-text

----------------------------

I hope, I am not pestering you :)

Thanks,
Hemanth


-----Original Message-----
>
Yes, you are correct, but MS doesn't have the situation where there are other driver managers that could be in use, and apps that may be directly linked to drivers.

if I got a error report that was along the line of

"Your crappy unixODBC has reported

[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does not exist.

You need to fix it"

I could spend the next three days looking for a problem that in fact didn't involve unixODBC at all.

--
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Nick Gorham | 5 Jun 2009 11:10
Favicon

Re: Regarding error messages coming from the driver (and not from the driver manager)

G, Hemanth Kumar wrote:
>
> Nick,
>
> I might not be clear enough in representing the issue in my earlier 
> mail. Let me try to be more clear this time..
>
> Even Microsoft driver manager appends its vendor's name, but only for 
> errors that come from driver manager, and not from the driver.
>
Yes, I see that, but the point I was making is if I remove the 
[unixODBC] and I get a report of the following error

[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does 
not exist.

There is no way to verify that the error involved unixODBC in any way. 
Its a matter of self preservation instead of strict adherence to the 
spec in this case.

Its a simple thing to change, but it would be nice to hear what would be 
gained by the change, I have said what would be lost...

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

G, Hemanth Kumar | 5 Jun 2009 12:02
Favicon

Re: Regarding error messages coming from the driver(and not from the driver manager)

No, there is nothing such, that would be gained by the change. We got
mismatches from our ODBC application and just wanted to confirm if this
has to be taken care of, by the driver manager.
I would now proceed with changing our application itself.

Thanks,
Hemanth. 

-----Original Message-----
From: unixodbc-dev-bounces <at> mailman.unixodbc.org
[mailto:unixodbc-dev-bounces <at> mailman.unixodbc.org] On Behalf Of Nick
Gorham
Sent: Friday, June 05, 2009 2:40 PM
To: Development issues and topics for unixODBC
Subject: Re: [unixODBC-dev] Regarding error messages coming from the
driver(and not from the driver manager)

G, Hemanth Kumar wrote:
>
> Nick,
>
> I might not be clear enough in representing the issue in my earlier 
> mail. Let me try to be more clear this time..
>
> Even Microsoft driver manager appends its vendor's name, but only for 
> errors that come from driver manager, and not from the driver.
>
Yes, I see that, but the point I was making is if I remove the
[unixODBC] and I get a report of the following error

[Teradata][ODBC Teradata Driver][Teradata Database] Object 'tmp1' does
not exist.

There is no way to verify that the error involved unixODBC in any way. 
Its a matter of self preservation instead of strict adherence to the
spec in this case.

Its a simple thing to change, but it would be nice to hear what would be
gained by the change, I have said what would be lost...

--
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

Nick Gorham | 5 Jun 2009 12:03
Favicon

Re: Regarding error messages coming from the driver(and not from the driver manager)

G, Hemanth Kumar wrote:
> No, there is nothing such, that would be gained by the change. We got
> mismatches from our ODBC application and just wanted to confirm if this
> has to be taken care of, by the driver manager.
> I would now proceed with changing our application itself.
>
>   
Well, as ever the idea of conforming to the spec got the better of me, I 
have added a --enable-stricterror that will do as you suggested, I have 
set the default to yes, so I will see if I get many of the confused 
reports. I suspect not now as people tend to know what they are using, 
it wasn't as clear in the past.

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

G, Hemanth Kumar | 5 Jun 2009 13:48
Favicon

Re: Regarding error messages coming fromthe driver(and not from the driver manager)

Thanks Nick, it works now! 

-----Original Message-----
From: unixodbc-dev-bounces <at> mailman.unixodbc.org
[mailto:unixodbc-dev-bounces <at> mailman.unixodbc.org] On Behalf Of Nick
Gorham
Sent: Friday, June 05, 2009 3:34 PM
To: Development issues and topics for unixODBC
Subject: Re: [unixODBC-dev] Regarding error messages coming fromthe
driver(and not from the driver manager)

G, Hemanth Kumar wrote:
> No, there is nothing such, that would be gained by the change. We got 
> mismatches from our ODBC application and just wanted to confirm if 
> this has to be taken care of, by the driver manager.
> I would now proceed with changing our application itself.
>
>   
Well, as ever the idea of conforming to the spec got the better of me, I
have added a --enable-stricterror that will do as you suggested, I have
set the default to yes, so I will see if I get many of the confused
reports. I suspect not now as people tend to know what they are using,
it wasn't as clear in the past.

--

-- 
Nick
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
_______________________________________________
unixODBC-dev mailing list
unixODBC-dev <at> mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev


Gmane