Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Location
    Tarragona, Sp
    Posts
    6

    Question Unanswered: Question MSDE: Query Analyzer vs MSAccess ADP

    Hi all!

    I have one UDF which take 5 params. When I run this UDF from Query Analyzer, it take 5 seconds, but when I run from ADP project (doble click), it take > 200 seconds. I look at the connexion, but I don't see nothing to change (File -> Connexion; in .adp).

    Can anybody tell me why?

    Thank's in advance

    koci.
    Last edited by koci; 09-30-05 at 07:07.

  2. #2
    Join Date
    Sep 2005
    Location
    Tarragona, Sp
    Posts
    6
    Ok, partially I solved the problem, but still have a question:
    The difference between this two tools:
    1. In QA:
    select * from CInventarioAFechaPaso7Agrupar ('01/01/06',1,10000,0,0,0)
    2. In ADP:
    Report.ControlSource = CInventarioAFechaPaso7Agrupar
    Report.InputParameters = @FechaInventario datetime = Forms!PIInventario!FechaInventario, @DesdeFabricante int = Forms!PIInventario!DesdeProveedor, @HastaFabricante int = Forms!PIInventario!HastaProveedor, @IDFamilia smallint = Forms!PIInventario!IDFamilia, @IDMarca smallint = Forms!PIInventario!IDMarca, @IDTienda smallint = Forms!PIInventario!IDTienda
    When I change the reports control source at:
    select * from CInventarioAFechaPaso7Agrupar ('01/01/06',1,10000,0,0,0)
    and clean InputParameters, everything works OK, like in QA (of the time point of view, of course), so, no difference.
    So far, so good.
    But if I want to put params in the reports control source, like:
    SELECT * FROM CInventarioAFechaPaso7Agrupar(@FechaInventario, @DesdeFabricante, @HastaFabricante, @IDFamilia, @IDMarca, @IDTienda)
    the InputParameters it's change in:
    ? = FechaInventario, ? = DesdeFabricante, ? = HastaFabricante, ? = IDFamilia, ? = IDMarca, ? = IDTienda
    And If I edit this line, changing in:
    @FechaInventario datetime = Forms!PIInventario!FechaInventario, @DesdeFabricante int = Forms!PIInventario!DesdeProveedor, @HastaFabricante int = Forms!PIInventario!HastaProveedor, @IDFamilia smallint = Forms!PIInventario!IDFamilia, @IDMarca smallint = Forms!PIInventario!IDMarca, @IDTienda smallint = Forms!PIInventario!IDTienda
    the line is change back in:
    ? = FechaInventario, ? = DesdeFabricante, ? = HastaFabricante, ? = IDFamilia, ? = IDMarca, ? = IDTienda
    and I have no way to avoid the manual introduction of params, to run the report.
    Any explications for this? A workaround, something?

    Thank's,

    koci.

    PS. The way that I use (and work) is assigning in code, in the reports open event, something like following:
    Dim MiSQL As String
    MiSQL = "select * from CInventarioAFechaPaso7Agrupar ('" & Forms!PIInventario!FechaInventario & "'," & _
    Forms!PIInventario!DesdeProveedor & "," & Forms!PIInventario!HastaProveedor & "," & _
    Forms!PIInventario!IDFamilia & "," & Forms!PIInventario!IDMarca & "," & Forms!PIInventario!IDTienda & ")"
    Debug.Print MiSQL
    Me.RecordSource = MiSQL
    but this is not very elegant, because can't see the field list, for an quick development of report.


    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •