Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TableAdapter.Fill() fails but no error message
Message
De
29/01/2013 09:10:02
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01564371
Message ID:
01564491
Vues:
28
>>>>>
>>>>>If you're not running anything extra such as Reporting Services,
>>>>
>>>>I am running Reporting Services, what do I need to do differently?
>>>>
>>>>FWIW I changed my code to use another tableadapter and it worked fine, so it seems to be something wrong with this one.
>>>
>>>I meant that SSRS usually sends lots of statements, so it may interfere with your trace.
>>
>>OK, so far I've narrowed it down to this stored procedure. If I change it to use a different one it works fine. I removed the parameter to make sure that wasn't the problem and still had the same problem.
>>
>>Is there some time out limit on the Fill command? The execution plan helped me fix some indexing issues and the SP now runs pretty fast.
>>
>>This is the SP definition, do you see anything strange in it:
>>
>>
USE [IBC]
>>GO
>>
>>/****** Object:  StoredProcedure [dbo].[InvoicesSelectByManifestNumber]    Script Date: 01/29/2013 09:58:23 ******/
>>SET ANSI_NULLS ON
>>GO
>>
>>SET QUOTED_IDENTIFIER ON
>>GO
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>CREATE PROCEDURE [dbo].[InvoicesSelectByManifestNumber]
>>(
>>	@awb_manifestnumber int
>>)
>>AS
>>	SET NOCOUNT ON;
>>SELECT  dbo.Customers.cus_firstname
>>		, dbo.Customers.cus_lastname
>>		, dbo.Customers.cus_company
>>		, dbo.Customers.cus_addr1
>>		, dbo.Customers.cus_addr2
>>		, dbo.Customers.cus_number
>>		,dbo.Customers.cus_hold
>>		,dbo.Customers.cus_cashonly
>>		, dbo.Areas.are_name
>>		, [dbo].[Routes].[rte_name]
>>		, dbo.Invoices.inv_number
>>		, dbo.Invoices.inv_date
>>		, dbo.Invoices.inv_pieces
>>		, dbo.Invoices.inv_weight
>>		, dbo.Invoices.inv_goodsvalue
>>		, dbo.AirWayBills.awb_pk
>>		, dbo.AirWayBills.awb_number
>>		,dbo.AirWayBills.awb_manifestdate
>>		,dbo.AirWayBills.awb_manifestnumber
>>		, dbo.Countries.cnt_code
>>		, dbo.InvoiceDetails.ivd_amount
>>		, dbo.ChargeTypes.cty_name 
>>FROM         dbo.Customers INNER JOIN
>>                      dbo.Areas ON dbo.Customers.cus_arefk = dbo.Areas.are_pk 
>>                     INNER JOIN
>>                      dbo.Countries ON dbo.Customers.cus_cntfk = dbo.Countries.cnt_pk 
>>                      INNER JOIN
>>                      dbo.Routes ON dbo.Customers.cus_rtefk = dbo.Routes.rte_pk 
>>                    INNER JOIN
>>                      dbo.Invoices ON dbo.Customers.cus_PK = dbo.Invoices.inv_cusfk 
>>                       INNER JOIN
>>                      dbo.AirWayBills ON dbo.Invoices.inv_awbfk = dbo.AirWayBills.awb_pk 
>>                        INNER JOIN
>>                      dbo.InvoiceDetails ON dbo.Invoices.inv_pk = dbo.InvoiceDetails.ivd_invfk 
>>                     INNER JOIN
>>                      dbo.ChargeTypes ON dbo.InvoiceDetails.ivd_ctyfk = dbo.ChargeTypes.cty_pk
>>	WHERE 
>>		([awb_manifestnumber] = @awb_manifestnumber)
>>ORDER BY dbo.[Routes].rte_name, dbo.Areas.are_name, dbo.Customers.cus_number, dbo.Invoices.inv_number, dbo.ChargeTypes.cty_name 
>>		
>>GO
>>
>
>The procedure looks OK to me (you need to make sure that all FK have indexes), but drop dbo. from the column lists and ON clauses, e.g.
>
>FROM dbo.Customers INNER JOIN dbo.Areas on Customers.cus_arefk = Areas.are_pk
>
>In other words, only use dbo. when you first name the table in the FROM clause and use just the alias everywhere else.

:) that code was all generated by the view builder. I never bother with dbo.

I narrowed it down to the Routes table being the problem. Once I remove that from the SP it works properly!
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform