Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL command in a macro against a view

Status
Not open for further replies.

sblocher

IS-IT--Management
Jun 17, 2003
28
US
Can i execute a SQL command in a macro to create a recordset from a view rather than using .Browse/.Fetch in a loop? If so, is an example available?
 
I don't believe that you can throught the COMAPI or the xAPI. However you can add parameters or criteria to the browse statement so that you return only a specific portion of the view. This would remove the need to loop trough (if your criteria are specific enough) the entire view.

Otherwise you woould have to use ADO and go directly to the database. Not recommended because the views hold the business logic and prevent data corruption.

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
As i suspected, unfortunately. I can make do with .browse parameters and a loop. Thanks! And thanks, in general, for your excellent replies to many questions on the forum.
 
Thank you for the kind words. I am glad to be helpful.

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top