Abnormal Behavior of SQL Server 2008 Enterprise Store Procedure
-
Dear members, I have recently installed SQL Server 2008 Enterprise Version. I have a database built in SQL SERVER 2000 which I attached in 2008. I have a stored procedure which calculates the Inventory Stock. In some cases the sp deducts qty twice when call from front end (VB 6.0) whereas when I run the sp in SQL Server it returns correct result It was running perfectly in SQL Server 2000 from VB 6.0 What could be the cause of this abnormal behavior? Note: The Compatibility Level of the database is set on SQL Server 2000 (80) Waiting for your kind replies. Thanks & Regards, Syed Adnan Shah
-
Dear members, I have recently installed SQL Server 2008 Enterprise Version. I have a database built in SQL SERVER 2000 which I attached in 2008. I have a stored procedure which calculates the Inventory Stock. In some cases the sp deducts qty twice when call from front end (VB 6.0) whereas when I run the sp in SQL Server it returns correct result It was running perfectly in SQL Server 2000 from VB 6.0 What could be the cause of this abnormal behavior? Note: The Compatibility Level of the database is set on SQL Server 2000 (80) Waiting for your kind replies. Thanks & Regards, Syed Adnan Shah
-
Dear Richard MacCutchan I have written in my post that it is running perfectly through code (VB 6) using SQL Server 2000. The problem occurred when i attached 2000 database in 2008 Enterprise.
-
Dear members, I have recently installed SQL Server 2008 Enterprise Version. I have a database built in SQL SERVER 2000 which I attached in 2008. I have a stored procedure which calculates the Inventory Stock. In some cases the sp deducts qty twice when call from front end (VB 6.0) whereas when I run the sp in SQL Server it returns correct result It was running perfectly in SQL Server 2000 from VB 6.0 What could be the cause of this abnormal behavior? Note: The Compatibility Level of the database is set on SQL Server 2000 (80) Waiting for your kind replies. Thanks & Regards, Syed Adnan Shah
Turn on Profiler and log what is happening when you call the stored procedure directly versus when you call it from VB 6.
-
Turn on Profiler and log what is happening when you call the stored procedure directly versus when you call it from VB 6.
Thanks for your reply When I call The Stored Procedure directly from Sql Server it adds or subtracts stock qty properly, but when i run it through vb6 code it adds or subtracts qty twice. But its not in every execution of SP. I m running my software for 3 to 4 years it never happened like this in SQL Server 2000
-
Thanks for your reply When I call The Stored Procedure directly from Sql Server it adds or subtracts stock qty properly, but when i run it through vb6 code it adds or subtracts qty twice. But its not in every execution of SP. I m running my software for 3 to 4 years it never happened like this in SQL Server 2000
What Tim is trying to suggest 1. Turn on SQL Profiler and start it running against your database 2. execute the stored procedure from the VB application 3. stop the profiler 4. in the results from the profiler you can see what was executed and the values that were passed to the stored procedure http://technet.microsoft.com/en-us/library/ms181091(v=sql.105).aspx[^] you need to be able to prove if it the database at fault or the stored procedure.
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
What Tim is trying to suggest 1. Turn on SQL Profiler and start it running against your database 2. execute the stored procedure from the VB application 3. stop the profiler 4. in the results from the profiler you can see what was executed and the values that were passed to the stored procedure http://technet.microsoft.com/en-us/library/ms181091(v=sql.105).aspx[^] you need to be able to prove if it the database at fault or the stored procedure.
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON
-
Dear members, I have recently installed SQL Server 2008 Enterprise Version. I have a database built in SQL SERVER 2000 which I attached in 2008. I have a stored procedure which calculates the Inventory Stock. In some cases the sp deducts qty twice when call from front end (VB 6.0) whereas when I run the sp in SQL Server it returns correct result It was running perfectly in SQL Server 2000 from VB 6.0 What could be the cause of this abnormal behavior? Note: The Compatibility Level of the database is set on SQL Server 2000 (80) Waiting for your kind replies. Thanks & Regards, Syed Adnan Shah
jugnu_ad wrote:
What could be the cause of this abnormal behavior?
VB6. Which existed waaaay before Sql Server 2008. Chances are that most of the code isn't type-safe but late-bound, and VB may be doing all kinds of magic on the background to make it work. Did I mention that VB.NET is available for free?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
jugnu_ad wrote:
What could be the cause of this abnormal behavior?
VB6. Which existed waaaay before Sql Server 2008. Chances are that most of the code isn't type-safe but late-bound, and VB may be doing all kinds of magic on the background to make it work. Did I mention that VB.NET is available for free?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
Sounds like this may be the issue that finally gets him to update/rewrite his app into a current language. Now there will be a whole lot of pressure while he could have started this a decade ago (so speaks the guy still coding in Silverlight :-O ).
Never underestimate the power of human stupidity RAH
-
Dear members, I have recently installed SQL Server 2008 Enterprise Version. I have a database built in SQL SERVER 2000 which I attached in 2008. I have a stored procedure which calculates the Inventory Stock. In some cases the sp deducts qty twice when call from front end (VB 6.0) whereas when I run the sp in SQL Server it returns correct result It was running perfectly in SQL Server 2000 from VB 6.0 What could be the cause of this abnormal behavior? Note: The Compatibility Level of the database is set on SQL Server 2000 (80) Waiting for your kind replies. Thanks & Regards, Syed Adnan Shah
-
jugnu_ad wrote:
What could be the cause of this abnormal behavior?
VB6. Which existed waaaay before Sql Server 2008. Chances are that most of the code isn't type-safe but late-bound, and VB may be doing all kinds of magic on the background to make it work. Did I mention that VB.NET is available for free?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
While VB 6 may have it issues, I have written and used in production many applications written in VB 6 pulling data from SQL Server without issue. If there is a problem, I suspect it is with the coding, not the underlying foundations.
-
While VB 6 may have it issues, I have written and used in production many applications written in VB 6 pulling data from SQL Server without issue. If there is a problem, I suspect it is with the coding, not the underlying foundations.
Tim Carmichael wrote:
While VB 6 may have it issues, I have written and used in production many applications written in VB 6 pulling data from SQL Server without issue.
Ditto. I never claimed that VB6 has issues with SQL Server - merely that it existed before Sql 2008. VB6 does not know about Sql2k8, and I doubt that new released Sql versions are tested for backward compatibility for a discontinued product.
Tim Carmichael wrote:
I suspect it is with the coding, not the underlying foundations.
I agree with the first part of this statement, and explained how the underlying foundation can cause this.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]