I'm trying to execute a stored procedure before a query, which works correctly in "Data Architect" but not in an ODBC connection, where the procedure executes but the "Select" returns zero results. The select and the procedure both individually work via ODBC, but not sequentially.

In MS SQL Server I would fix this issue with "SET NOCOUNT ON" at the start of the script, but I can't find an equivalent in Advantage Database.

asked 06 Jan '15, 05:30

Virtuoso's gravatar image

Virtuoso
16113
accept rate: 0%

ADS only ever returns the data of the last statement in a query batch, so there is no need for such a setting.

(06 Jan '15, 06:38) Jens Mühlenhoff

The strange thing is that the ODBC connection will happily execute the select or procedure individually, but not both in sequence; while the Data Architect works either way. Do you know why that would happen?

(06 Jan '15, 07:03) Virtuoso

Can you reproduce this with some simple example code? http://sscce.org/

(07 Jan '15, 02:35) Jens Mühlenhoff

SELECT 1 FROM System.IOTA; SELECT 1 FROM System.IOTA;

Executing the above via an ODBC / ADODB connection returns nothing, but it returns "1" from Data Architect. The data connections both work ok with a single statement.

(07 Jan '15, 05:41) Virtuoso

I can reproduce this.

(09 Jan '15, 04:20) Jens Mühlenhoff

Also my initial comment is obviously wrong here, the ODBC driver seems to not return any data at all when a statement batch (more than one statement) is executed.

(09 Jan '15, 05:13) Jens Mühlenhoff

The reason this works from Data Architect is that it uses the ADS Delphi components and not ODBC.

(09 Jan '15, 05:14) Jens Mühlenhoff
showing 5 of 7 show 2 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×325
×40

Asked: 06 Jan '15, 05:30

Seen: 1,802 times

Last updated: 09 Jan '15, 05:14

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.