Usage Note 32973: Read-access violations occur intermittently when you use the IMPORT procedure in Microsoft Excel Files
When you use PROC IMPORT in an Excel workbook, you can receive the following error messages intermittently (that is, the messages do not necessarily appear at the same time):
ERROR: Read Access Violation In Task [ SQL )
Exception occurred at (7317A3D5)
Task Traceback
Address Frame (DBGHELP API Version 4.0 rev 5)
Although the PROC IMPORT code is correct and the Excel file exists, the problem occurs when you use Dynamic Data Exchange (DDE) to open, close, or update Excel files in a step that occurs before the IMPORT procedure is used.
Using DDE prior to IMPORT procedure calls the Jet technology to save the files, just as the IMPORT and EXPORT procedures do. If the DDE code does not complete quickly enough, the file is still in an open state before PROC IMPORT can read it, and the errors occur as a result.
To resolve the problem, place a sleep command before the IMPORT procedure so that Excel can complete its task using DDE. The sleep command syntax is as follows:
data _null_;
x=sleep(3);
run;
This example pauses the system for 3 seconds. You can adjust the time, depending on the speed of your system.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to PC Files | Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
| Microsoft® Windows® for x64 | 9.1 TS1M3 SP4 | |
| Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
| Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
| Windows Vista | 9.1 TS1M3 SP4 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Intermittant Read-access violations can occur when you use the IMPORT procedure after Dynamic Data Exchange (DDE) has been running. The problem occurs when you use DDE to open, close, or update Excel files in a step that occurs before the IMPORT procedure is used.
| Date Modified: | 2008-08-18 14:09:24 |
| Date Created: | 2008-08-14 10:27:35 |