Results 1 to 6 of 6
  1. #1
    mictip is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    2

    How do I to run an Informix stored procedure using MSAccess?

    I use MSAccess to link to an informix db to run reports I create for the users who are given user logins to the informix db. I am not a programmer but can write basic SQL statements. I created an MSAccess query that has a number of parameters - some user input (from/to date) and some fixed. The fixed ones go against columns that are not indexed and it takes a long long time to run so the DBA is asking if I am able to execute a stored procedure in informix from within MSAccess. I have never done this and do not know where to start. Is this something I can do if he gives me the name of the stored procedure? I want to extract the data and create a report that displays it when the users run the report and input the date parameters...help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Does this help? I see reference to informix in the attempted code.
    http://visualbasic.ittoolbox.com/gro...pletion-524050
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mictip is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    2

    More help please: here is what syntax I have so far.

    Thank you for replying so fast. The link you gave me did not help as it shows VB programming lingo; I am not a programmer! In MSAccess view I currently have the following syntax:

    SELECT informix_rtscaseh.case_number, informix_rtsprtyh.identifying_name, informix_rtsordeh.order_type_id, informix_rtsordeh.order_status, informix_rtsordeh.[total_ordered]-[total_applied] AS balance, informix_rtsordeh.order_create_date, informix_rtsordeh.filing_type_code, informix_rtsordeh.order_change_date, informix_rtscaspd.prob_type_code
    FROM (((informix_rtsordeh INNER JOIN informix_rtscaseh ON informix_rtsordeh.case_id = informix_rtscaseh.case_id) INNER JOIN informix_rtsorpad ON (informix_rtsordeh.order_line_number = informix_rtsorpad.order_line_number) AND (informix_rtsordeh.case_id = informix_rtsorpad.case_id)) INNER JOIN informix_rtscaspd ON (informix_rtscaspd.case_id = informix_rtscaseh.case_id) AND (informix_rtsorpad.payer_party_id = informix_rtscaspd.party_id) AND (informix_rtsorpad.case_id = informix_rtscaspd.case_id)) INNER JOIN informix_rtsprtyh ON informix_rtscaspd.party_id = informix_rtsprtyh.party_id
    WHERE (((informix_rtsordeh.order_status)="A") AND ((informix_rtsordeh.order_create_date) Between [Enter start date] And [Enter end date]) AND ((informix_rtsordeh.filing_type_code)="UNS") AND ((informix_rtscaspd.payer_role)="Y") AND ((informix_rtscaspd.prob_type_code)="P"));

    What would I insert (other than the name of the stored procedure in Informix) in order to run the procedure so it will return the data?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I don't really know, other than I doubt can do this from an Access query. I expect VBA will be required. VB and VBA are almost the same. What works in VB usually works in VBA.

    What does the stored procedure do?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    See this link, it may be helpful
    http://www.xtremevbtalk.com/showthread.php?t=98237

  6. #6
    Doug Lawry is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Posts
    1
    If you can't execute an Informix procedure directly, use the following trick:

    SELECT * FROM TABLE(FUNCTION procedure(parameters)) AS alias (columns)

    Regards,
    Doug Lawry

Please reply to this thread with any new information or opinions.

Similar Threads

  1. write stored procedure with 'if else'
    By shital in forum Access
    Replies: 9
    Last Post: 04-11-2018, 11:47 AM
  2. Executing Oracle Stored Procedure
    By gsurfdude in forum Programming
    Replies: 0
    Last Post: 03-01-2011, 09:23 AM
  3. Replies: 0
    Last Post: 05-12-2010, 09:41 AM
  4. Pass image parameter to stored procedure
    By Kencao in forum Programming
    Replies: 3
    Last Post: 04-28-2010, 11:51 PM
  5. stored procedure return value to access form
    By rbw940 in forum Programming
    Replies: 0
    Last Post: 10-13-2008, 01:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums