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
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
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 ).
Never underestimate the power of human stupidity
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.
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
If you can't read my code, try converting it here[^]
it happens when i try execute the sample provided in mysql doc about prepared statement, i created the table with columns correspond with the sample. mysql prepared statement
then when i execute it(BTW i used the c# sample), it populate the rows with 1000 entries.
after that i try to insert one entry with out the prepared statement (at this moment the ignore prepare property is set to true), then the executeNonQuery return 1, so it means it inserted the so i checked the database but the value i inserted is not in there, so i try it many time but still no luck.
so i decide to write the insert query directly to workbench, but i got thesame result the data was not there.
so i tried to delete the last row, then the weird things happen. it delete the the last row that has an the id of 1000(btw the id was autoincrement) it also insert 1 new data with the id of 1001, so try to delete to rows but after the two rows was deleted it also insert two more rows with the id of 1002 and 1003.
then after that i tried to insert new data but is still keep telling me that 1 row is inserted but i cant see that on the table so, i tried to delete rows still bu t it still doing the same.
BTW as u can see on the documentation the second column is a number, then when i delete the data it also insert now row with the incremented value of it.
so i decide to truncate the table and insert few row and then delete some of it, at this point it was working as expected, then i decide to execute the prepared statement(ignore prepare set to false) then after that it do the same weird things.
i dont know what on this, could somebody explain to me.
i will appreciate for any enlightenment will come.