By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 1,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

Bizarre error with no error information.

P: n/a
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, MyODBC, C#)

Jan 5 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 5 Jan 2007 13:04:31 -0800, Zeya 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, MyODBC, C#)
1) What version of MySQL
2) Any particular reason why you're using the ODBC driver instead of a
native .NET MySQL provider?

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 6 '07 #2

P: n/a
Thanks Rad for your response.

MySQL version is 4.1.

My requirements wanted me to use the ODBC driver.
Thanks.
Rad [Visual C# MVP] wrote:
On 5 Jan 2007 13:04:31 -0800, Zeya 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, MyODBC, C#)

1) What version of MySQL
2) Any particular reason why you're using the ODBC driver instead of a
native .NET MySQL provider?

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 6 '07 #3

P: n/a
Rad, I tried .Net connector and it worked flawlessly.

I guess I need to convince on using .Net connector instead.

Rad [Visual C# MVP] wrote:
On 5 Jan 2007 13:04:31 -0800, Zeya 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, MyODBC, C#)

1) What version of MySQL
2) Any particular reason why you're using the ODBC driver instead of a
native .NET MySQL provider?

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 7 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.