Re: Process 75 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

17 views
Skip to first unread message
Message has been deleted

Sanil Singh Tomar

unread,
Aug 5, 2009, 3:22:18 AM8/5/09
to icomputer-te...@googlegroups.com
I think there is a typo error in line " from openquery(mysqlserver, 'Select *  from shipmentheadertb') "
 
this might be the correct, I'm not sure though. Anyways, can't tell accurately since, we don't know DB schema
 
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER Procedure [dbo].[spUpdateShippingInfo]
(
       @Date datetime,
       @custno int
)
AS
DBCC TRACEON(8765)
UPDATE  tblshipmentheader
SET     tblshipmentheader.DateShipped = mainframe.PackageDate,
       tblshipmentheader.ShipVia = mainframe.shipvia,
       tblshipmentheader.TrackingNumber = mainframe.trackid,
       tblshipmentheader.Weight = mainframe.weight,
       tblshipmentheader.Tax = mainframe.TotalTax,
       tblshipmentheader.Freight = mainframe.freight,
       tblshipmentheader.ShipFrom = mainframe.shipfrom,
       tblshipmentheader.Shipterms = mainframe.shipterms,
       tblshipmentheader.Cartons = mainframe.cartons
from openquery(mysqlserver, 'Select *  from shipmentheadertb,
mainframe inner join
       tblorderheader ON tblorderheader.mainframeorderid = mainframe.orderno
inner join
       tblshipmentheader ON (tblshipmentheader.AODOrderID =
tblorderheader.AODOrderID and
       tblshipmentheader.shipmentid = mainframe.shipseq)
WHERE   mainframe.custno = @custno --and mainframe.packagedate =
@Date
       and mainframe.PackageDate is not null
       and mainframe.PackageDate != ''
       and mainframe.trackid is not null
       and mainframe.trackid != ''
       and tblorderheader.AODOrderStatusID != 4
       and tblorderheader.AODOrderStatusID != 7
DBCC TRACEoff(8765)
update  tblorderheader
SET tblorderheader.AODOrderStatusID = 4
WHERE tblorderheader.AODOrderStatusID != 7 and
tblorderheader.AODOrderID IN
(SELECT DISTINCT AODOrderID
       FROM tblshipmentheader
       WHERE  TrackingNumber IS NOT NULL
                       and TrackingNumber != ''
       --AND tblshipmentheader.DateShipped = @Date')

On Tue, Aug 4, 2009 at 10:03 PM, sushma <sush...@gmail.com> wrote:

while exectuing a Stored Proc I am getting these errors



OLE DB error trace [OLE/DB Provider 'MSDASQL'
IDBInitialize::Initialize returned 0x8000ffff:  The provider reported
an unexpected catastrophic failure.].
Msg 7399, Level 16, State 1, Procedure spUpdateShippingInfo, Line 12
OLE DB provider 'MSDASQL' reported an error. The provider reported an
unexpected catastrophic failure.
Msg 0, Level 19, State 0, Procedure spUpdateShippingInfo, Line 12
SqlDumpExceptionHandler: Process 75 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.



and the Stored Proc is




set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


ALTER Procedure [dbo].[spUpdateShippingInfo]

(
       @Date datetime,
       @custno int
)

AS
DBCC TRACEON(8765)
UPDATE  tblshipmentheader
SET     tblshipmentheader.DateShipped = mainframe.PackageDate,
       tblshipmentheader.ShipVia = mainframe.shipvia,
       tblshipmentheader.TrackingNumber = mainframe.trackid,
       tblshipmentheader.Weight = mainframe.weight,
       tblshipmentheader.Tax = mainframe.TotalTax,
       tblshipmentheader.Freight = mainframe.freight,
       tblshipmentheader.ShipFrom = mainframe.shipfrom,
       tblshipmentheader.Shipterms = mainframe.shipterms,
       tblshipmentheader.Cartons = mainframe.cartons
from openquery(mysqlserver, 'Select *  from shipmentheadertb')
mainframe inner join
       tblorderheader ON tblorderheader.mainframeorderid = mainframe.orderno
inner join
       tblshipmentheader ON (tblshipmentheader.AODOrderID =
tblorderheader.AODOrderID and
       tblshipmentheader.shipmentid = mainframe.shipseq)
WHERE   mainframe.custno = @custno --and mainframe.packagedate =
@Date
       and mainframe.PackageDate is not null
       and mainframe.PackageDate != ''
       and mainframe.trackid is not null
       and mainframe.trackid != ''
       and tblorderheader.AODOrderStatusID != 4
       and tblorderheader.AODOrderStatusID != 7

DBCC TRACEoff(8765)

update  tblorderheader
SET tblorderheader.AODOrderStatusID = 4
WHERE tblorderheader.AODOrderStatusID != 7 and
tblorderheader.AODOrderID IN
(SELECT DISTINCT AODOrderID
       FROM tblshipmentheader
       WHERE  TrackingNumber IS NOT NULL
                       and TrackingNumber != ''
       --AND tblshipmentheader.DateShipped = @Date
)



E-Mail ID:
sani...@gmail.com | sani...@hotmail.com | sani...@student-partners.com

Blog: http://Sanil-singh.Spaces.Live.Com/Blog
Projects Blog: http://TheWiredGuy.com/ProjectsBlog
Twitter: LON3WOLF
Cell: +91 9928338195

Niner Zone:http://channel9.msdn.com/niners/sanil_singh
CodePlex Profile: http://www.codeplex.com/site/users/view/sanil_sun

Reply all
Reply to author
Forward
0 new messages