469,643 Members | 2,064 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Bizarre error with no error information.

zb
I am writing a C# program that uses MySQL as database and MySQL ODBC
3.51 driver.

It works fine all the way except this scenario that needs to be
addressed.

1. Get a set of records to process (this brings back a datatable in C#
and works fine. It uses a limit of 30 records each time).
2. Process the information from Step 1.
3. Check in table B if data of this exists in table B
4. Based on info from Step 3 Insert/Update data in table B (in either
case only one row will be affected)
5. Get next record in Step 2 and repeat further till all records
processed.
Doing so throws exception that I have no idea.
>From Event Viewer.
First I get two COM+ errors and then my application log.

COM+ errors category - unknown and Event - 4786:
------------------------------------------------------------------------------------------------------------------------------------------------
The system has called a custom component and that component has failed
and generated an exception. This indicates a problem with the custom
component. Notify the developer of this component that a failure has
occurred and provide them with the information below.
Component Prog ID: 0[ODBC][Env 32212a0]
Method Name: IDispenserDriver::DestroyResource
Process Name: MyApp.exe
Exception: C0000005
Address: 0x7C910E03
Call Stack:
ntdll!wcsncpy + 0x374
myodbc3! + 0x4DB5D
myodbc3!SQLTransact + 0x8F5D

COM+ Second error:
------------------------------------------------------------------------------------------------------------------------------------------------

The system has called a custom component and that component has failed
and generated an exception. This indicates a problem with the custom
component. Notify the developer of this component that a failure has
occurred and provide them with the information below.
Component Prog ID: 0[ODBC][Env 32212a0]
Method Name: IDispenserDriver::CreateResource
Process Name: MyApp.exe
Exception: C0000005
Address: 0x7C91142E
Call Stack:
ntdll!wcsncpy + 0x99F
myodbc3! + 0x4DAA2
myodbc3! + 0x4DAC4

Then my app logs:
------------------------------------------------------------------------------------------------------------------------------------------------
ERROR - no error information available
at System.Data.Odbc.OdbcConnection.Open()
..... <remaining stack trace of my app 2 items>
Second log from my app:
------------------------------------------------------------------------------------------------------------------------------------------------

System.Data
Object reference not set to an instance of an object.
at System.Data.Common.Odbc32.SQLDisconnect(HandleRef
ConnectionHandle)
at System.Data.Odbc.DBCWrapper.CloseAndRelease()
at System.Data.Odbc.OdbcConnection.DisposeClose()
at System.Data.Odbc.OdbcConnection.Close()
at System.Data.Odbc.OdbcConnection.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
..... <remaining stack trace of my app 2 items>

<END OF LOGS>
What is going on? How do I resolve this?

Thanks in advance.

PS: I may cross post this in different forums (possible other forums:
MySQL, C#)

Jan 5 '07 #1
1 4963
zb
I switched to .net connector and it works well now.

zb wrote:
I am writing a C# program that uses MySQL as database and MySQL ODBC
3.51 driver.

It works fine all the way except this scenario that needs to be
addressed.

1. Get a set of records to process (this brings back a datatable in C#
and works fine. It uses a limit of 30 records each time).
2. Process the information from Step 1.
3. Check in table B if data of this exists in table B
4. Based on info from Step 3 Insert/Update data in table B (in either
case only one row will be affected)
5. Get next record in Step 2 and repeat further till all records
processed.
Doing so throws exception that I have no idea.
From Event Viewer.
First I get two COM+ errors and then my application log.

COM+ errors category - unknown and Event - 4786:
------------------------------------------------------------------------------------------------------------------------------------------------
The system has called a custom component and that component has failed
and generated an exception. This indicates a problem with the custom
component. Notify the developer of this component that a failure has
occurred and provide them with the information below.
Component Prog ID: 0[ODBC][Env 32212a0]
Method Name: IDispenserDriver::DestroyResource
Process Name: MyApp.exe
Exception: C0000005
Address: 0x7C910E03
Call Stack:
ntdll!wcsncpy + 0x374
myodbc3! + 0x4DB5D
myodbc3!SQLTransact + 0x8F5D

COM+ Second error:
------------------------------------------------------------------------------------------------------------------------------------------------

The system has called a custom component and that component has failed
and generated an exception. This indicates a problem with the custom
component. Notify the developer of this component that a failure has
occurred and provide them with the information below.
Component Prog ID: 0[ODBC][Env 32212a0]
Method Name: IDispenserDriver::CreateResource
Process Name: MyApp.exe
Exception: C0000005
Address: 0x7C91142E
Call Stack:
ntdll!wcsncpy + 0x99F
myodbc3! + 0x4DAA2
myodbc3! + 0x4DAC4

Then my app logs:
------------------------------------------------------------------------------------------------------------------------------------------------
ERROR - no error information available
at System.Data.Odbc.OdbcConnection.Open()
.... <remaining stack trace of my app 2 items>
Second log from my app:
------------------------------------------------------------------------------------------------------------------------------------------------

System.Data
Object reference not set to an instance of an object.
at System.Data.Common.Odbc32.SQLDisconnect(HandleRef
ConnectionHandle)
at System.Data.Odbc.DBCWrapper.CloseAndRelease()
at System.Data.Odbc.OdbcConnection.DisposeClose()
at System.Data.Odbc.OdbcConnection.Close()
at System.Data.Odbc.OdbcConnection.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
.... <remaining stack trace of my app 2 items>

<END OF LOGS>
What is going on? How do I resolve this?

Thanks in advance.

PS: I may cross post this in different forums (possible other forums:
MySQL, C#)
Jan 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Alan Little | last post: by
2 posts views Thread by D. Alvarado | last post: by
reply views Thread by Roy Smith | last post: by
1 post views Thread by Richard | last post: by
1 post views Thread by Michael Carr | last post: by
4 posts views Thread by Neo Geshel | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.