For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Ahh, I am so used to using collections I have forgotten what it is like to access the database directly. I would suggest you may want to take a look at your architecture, I presume you are using winforms and binding the datasets to the controls which is going to entail a lot of work to change.
Never underestimate the power of human stupidity
Yes man I am sorry I got pissed off with guy who wrote without comments, but good thing is I brought all my peace back again and I read it and fixed the issue. Thanks for reminding me of my mistake or anger, after all we are all human beings.
Sorry once again.
The code you have posted is far too big for someone to read and understand what you're trying t do in each section.
When you say that the procedure works fine if you call it using plain SQL and EXEC and it doesn't work when you call it from the application, the problem most likely resides in the application, not in the procedure.If the parameters are really the same in both cases the only thing that would change the procedure behaviour is changes in the database.
You should double check that the parameters leaving from your application are really the same. Use the debugger to check what happens in the calling code. If that seems valid then debug the procedure and see what happens. For more information see How to: Debug Stored Procedures[^]
I got it fixed, just asking one question that if we have Select statement in between on Table variables would the Stored procedure not work properly, I had it some where and I removed it. It was working fine on the Query Window because it displays all the Selects but wasn't working from UI probably it first select as record set may be my guess. If you know more clarify it is just an understanding discussion but the problem is resolved.
Thanks for all your support, and the person who wrote wasn't having comments to understand it better.
The BETWEEN condition needs two single values; the lower and the upper bound. For example:
WHERE NumColumn BETWEEN5AND10
In that example you can't replace neither 5 or 10 with table variables since then there would be more than one value in the comparison. You can think the BETWEEN condition as two separate conditions, like:
WHERE NumColumn >= 5AND NumColumn <= 10
I hope this clarifies your question.
Last Visit: 31-Dec-99 19:00 Last Update: 27-Feb-15 23:26