Unhandled Exception In Mmc.exe: : Access Violation
Dec 19, 2005
Hi all,
Since yesterday I'm unable to lauch the enterprise manager, it gives
the following error :
Unhandled exception at 0x0101f07e in mmc.exe: 0xC0000005: Access
violation reading location 0x00000064.
The weird thing is that except installing the office xp PIA's I can't
image what else could be changed on my system.
I tried reinstalling, but still the same error.
I tried SP3a, still nothing changed.
Searched in some groups and it seems that not much can be found about
it, so my inspiration is running dry.
Anyone had this problem ? Anyone any suggestions how to solve it ?
Regards,
Koen
View 2 Replies
Jun 24, 2007
Hi,
Background:
This could be a simple C++ issue as I am not that familiar with the language. I am trying to prototype a small program to test the performance of inserting data using the BCP interface. I want to BCP data that my program generates and passes via program variables.
I have narrowed the issue down to a sprintf call. Following are two variations of the code - one that works and one that does not. The error happens when I try to execute the bcp_sendrow() call.
What is the appropriate way to create / send string data to the BCP interface. Any good examples available? I have created the following from the BulkCopyFromVariables example on the Microsoft SQL Server downloads site.
Thanks in advance, Kerry
---- Works ----
Code Snippet
for(idx=1; idx<=5; idx++){
//sprintf(k1, "%d", idx); //does not work...
sprintf(k1, "oo"); //works....
if ( (SendRet = bcp_sendrow(hdbc1) ) != SUCCEED ) {
printf("bcp_sendrow(hdbc1) Failed");
Cleanup();
return(9);
}
}
--- Causes Access Violation ----
Code Snippet
for(idx=1; idx<=5; idx++){
sprintf(k1, "%d", idx); //does not work...
//sprintf(k1, "oo"); //works....
if ( (SendRet = bcp_sendrow(hdbc1) ) != SUCCEED ) {
printf("bcp_sendrow(hdbc1) Failed");
Cleanup();
return(9);
}
}
--- Additional information ---
---------------------------
Target Table Definition
---------------------------
Code SnippetCREATE TABLE PtTest(
[ID] [int] IDENTITY(1,1) NOT NULL,
[PtID] [int] NOT NULL,
[ParamID] [nchar](10) NULL DEFAULT ((200)), --Above example trying to insert data here via k1 variable...
[ParamValue] [nchar](10) NULL DEFAULT ((200)),
[InsDate] [datetime] NULL DEFAULT (getdate()),
)
----------------------------
-----------------
Bind statements
-----------------
Code Snippet
int idx;
char k1[5];
char *terminator = "