View previous topic :: View next topic
|
Author |
Message |
vinay19
New User
Joined: 31 May 2007 Posts: 24 Location: Bangalore
|
|
|
|
Hi,
We have a vb6 application which was working fine until we installed db2 client v9.7.
Application datagrid and after entering all the details in first row, details are inserted into the database with datagrid.beforeupdate event.
Datagrid control is bound to database.
Code:
Private Sub DataGrid1_BeforeUpdate(Cancel As Integer)
If bolMyCriticalErrorFlg Then
Cancel = True
End If
End Sub
Application is just freezing in this event after installing db2 client version 9.7. It works fine if we install 9.1 again.
Any thoughts... |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
vinay19
New User
Joined: 31 May 2007 Posts: 24 Location: Bangalore
|
|
|
|
Its' a client. Yes i tried to debug the application using vb6. Upgrade was fine without any errors. Besides application is able to connect to db2, select queries are working and even insert statements are working fine. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
Yes i tried to debug the application using vb6
|
And what happened?
Do you use the OLE DB,ODBC or IBM DB2 .Net Data Provider?
Do you have the latest Framework installed?
Are there any error messages? |
|
Back to top |
|
|
vinay19
New User
Joined: 31 May 2007 Posts: 24 Location: Bangalore
|
|
|
|
It just freezes after that subroutine. Application uses ODBC driver.
What framework? Application is in vb6 and not dot net.
There are no error messages. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
vinay19
New User
Joined: 31 May 2007 Posts: 24 Location: Bangalore
|
|
|
|
Nope, this is not the problem with my case. Beforeupdate event is getting fired. It is at this event, application is getting frozen. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
And if you set cancel to false if your flag is not on? |
|
Back to top |
|
|
vinay19
New User
Joined: 31 May 2007 Posts: 24 Location: Bangalore
|
|
|
|
PeterHolland wrote: |
And if you set cancel to false if your flag is not on? |
It is not going inside the if condition. So value of Cancel is not getting altered. I compared the datagrid values and it is all the same when I run the application with db2 v 9.1 and DB2 v 9.7 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Besides application is able to connect to db2, select queries are working and even insert statements are working fine. |
I'm confused. . . If selects and inserts are working, when does the "freeze" occur?
It may be possible that the interface to v9.7 requires a more current interface on the pc? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Well i'm at a loss for now. Maybe your VB6 people can help you.
Maybe other events are triggered before your event is fired. |
|
Back to top |
|
|
vinay19
New User
Joined: 31 May 2007 Posts: 24 Location: Bangalore
|
|
|
|
Dick Sherrer,
Explicit queries are working fine, here the datagrid control is bound to the database. So when the user moves to the next row, the first row in datagrid gets inserted into the bound table. This is working fine in DB 9.1, but doesn't work with 9.7.
Beforeupdate event description:
When the user moves to another row or the Recordset object's Update method is executed, data is moved from the DataGrid control's copy buffer to the Data control's copy buffer and written to the database
[Source: MSDN] |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Ok, but i repeat:
Quote: |
It may be possible that the interface to v9.7 requires a more current interface on the pc? |
You may need to contact DB2 Support to confirm this or to see if there are any VB6 special considerations. |
|
Back to top |
|
|
vinay19
New User
Joined: 31 May 2007 Posts: 24 Location: Bangalore
|
|
|
|
Thanks a lot. I will contact vb6 people first. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
Is there any chance to upgrade to a more current release of VB? I don't "do" vb, but my clients that write vb apps are well beyond vb6. . .
d |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Vinay,
Check in the Windows Event Viewer, may be you can see some messages there.
Thanks,
Sushanth |
|
Back to top |
|
|
|