How to exec macro from MS Access?
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


How to exec macro from MS Access? Expand / Collapse
Author
Message
Posted 11/29/2007 3:15:26 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/20/2008 1:58:45 PM
Posts: 4, Visits: 10
Hello,

I am trying to "exec" a macro from MS Access as a pass-through query. However, if the macro has insert/update/delete then a select, no data will be returned with an error of "Pass-through query with ReturnsRecords property set to True did not return any records. (Error 3325)". Only when the macro is the select will data be returned. It appears as though the macro is "being expanded" by MS Access as multiple lines - which it won't process, only a single line. BTW, it will work with other DBMS stprocs. Could this be a driver problem? or the correct behavior?

Thanks



Post #9916
Posted 11/30/2007 6:20:37 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: PAC and SFT Members
Last Login: 2 days ago @ 5:38:40 PM
Posts: 280, Visits: 297
A Teradata macro is a "multi-statement request" that can return multiple result sets. That requires special handling / workarounds within MS Access or any other client application. In particular, INSERT/UPDATE/DELETE will return "empty" result sets to allow passing back status information.

The same issue would surface with a SP in some other database that attempted to return multiple result sets - but you typically would handle INSERT/UPDATE/DELETE status within the SP and not return a result set to the caller for those.
Post #9925
Posted 12/4/2007 11:16:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/20/2008 1:58:45 PM
Posts: 4, Visits: 10
Hello,

Could you expand as to how to work around? Again, we can execute a stproc (MS Access or Sybase) that has multiple statements, but only 1 select (at the end of the stproc) and this works OK as a pass-through query in MS Access.

Thanks for the information,

Elle
Post #9954
Posted 12/4/2007 3:01:49 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: PAC and SFT Members
Last Login: 2 days ago @ 5:38:40 PM
Posts: 280, Visits: 297
It depends on what you are doing in Access. If you are using VBA with ADO, you can use the nextResultSet method. You can also build a "MakeTable Query" on top of the pass-through query. Search MDSN, Google, etc. for more information on Access and "multiple result sets"
Post #9956
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 7:01pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 8 queries. Compression Disabled.