Microsoft KB Archive/883710

= FIX: bcp utility causes an access violation when you import data that has a mismatch field for a data column =

Article ID: 883710

Article Last Modified on 3/14/2007

-

APPLIES TO


 * Microsoft Data Access Components 2.8, when used with:
 * Microsoft Windows XP Professional

-





SYMPTOMS
When you use the bcp command prompt utility, an access violation occurs when all the following conditions are true:
 * You use the bcp utility.
 * You use a wrong format file.
 * You try to log the error information by using the -e switch option of the bcp utility.

The file that you specified for storing the error log is created but no information is stored.

Note A format file is used to store the format information for each field in a data file. The format information includes information about the storage type, prefix length, field length, and field and row terminators.



CAUSE
The bcp utility cannot create an error log by using the -e switch option if the wrong format file is used to import data from a text file.



RESOLUTION
To resolve this problem, obtain the latest service pack for Microsoft Windows XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

322389 How to obtain the latest Windows XP service pack



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Call Stack
ChildEBP RetAddr Args to Child 00107d78 1f9f6c0c 00107d94 000000c8 20202020 SQLSRV32!numerictostring+0x18 [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlccnvt.c @ 4871] 00107e7c 1f9d9659 00138810 00000002 00e33d40 SQLSRV32!ConvertToChar+0x412 [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlccnvt.c @ 841] 00107ea8 1f9e9592 00138810 20202020 00000002 SQLSRV32!Convert+0x202 [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlccnvt.c @ 289] 00108034 1f9ec4f6 00138810 00109cbd 00000006 SQLSRV32!bcpLog+0x4b5 [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlcbcp.c @ 5936] 001080f4 1f9eec1d 00138810 00cfa3c8 0000036c SQLSRV32!SendRow+0xb0b [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlcbcp.c @ 7152] 00108140 1f9eed52 00138810 00000001 00cfa3c8 SQLSRV32!bcpSendRecord+0x5eb [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlcbcp.c @ 5732] 00108170 1f9eef4d 00099348 00000000 7ffdf000 SQLSRV32!bcpSend+0x11f [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlcbcp.c @ 5370] 00108198 1f9b17ac 00138810 0012fef0 00000000 SQLSRV32!BCP_exec+0x52 [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlcbcp.c @ 1307] 001081b0 00404cf2 007c14a8 0012fef0 00000000 odbcbcp!bcp_exec+0x4d [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\odbcbcp\bcpstub.c @ 309] WARNING: Stack unwind information not available. Following frames may be wrong. 0012ff80 00405b79 00000009 008c2bb0 008c2c88 image00400000+0x4cf2 0012ffc0 77ea847c 00099348 00000000 7ffdf000 image00400000+0x5b79 0012fff0 00000000 00405ab4 00000000 000000c8 KERNEL32!ProcessIdToSessionId+0x17d 0:000> r eax=00107d94 ebx=20202020 ecx=00000002 edx=00000001 esi=20202023 edi=00107ce0 eip=1f9f6756 esp=00107c58 ebp=00107d78 iopl=0 nv up ei pl zr na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246 SQLSRV32!numerictostring+0x18: 1f9f6756 a5 movsd ds:20202023=???????? es:00107ce0=77f82fc0 0:000> u SQLSRV32!numerictostring SQLSRV32!numerictostring [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlccnvt.c @ 4857]: 1f9f673e 55 push ebp 1f9f673f 8bec mov ebp,esp 1f9f6741 81ec18010000 sub esp,0x118 1f9f6747 8365fc00 and dword ptr [ebp-0x4],0x0 1f9f674b 56 push esi 1f9f674c 57 push edi 1f9f674d 8d7303 lea esi,[ebx+0x3] 1f9f6750 8dbd68ffffff lea edi,[ebp-0x98] 0:000> u SQLSRV32!numerictostring+0x18 [d:\mdac27sp1qfeforshilohsp3rtm\sqlinterfaces\odbc\drivers\sqlsrvr\sqlccnvt.c @ 4871]: 1f9f6756 a5 movsd 1f9f6757 a5 movsd 1f9f6758 a5 movsd 1f9f6759 8d8568ffffff lea eax,[ebp-0x98] 1f9f675f 8945f4 mov [ebp-0xc],eax 1f9f6762 8a4302 mov al,[ebx+0x2] 1f9f6765 8d8de8feffff lea ecx,[ebp-0x118] 1f9f676b a5 movsd

