Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi guys,
i meet a very very strange problem today, hope any one could help me.
the problem is that i have a Stored Procedure, there are 2 fields' values are null after executing the Stored Procedure. this should be ok. i used this Stored Procedure to gather the data from database for a crystal report. but when i export it to a excel file, the strange thing happened, there are some data shown in the 2 fields which values are null just now. i check many times whether connected a right sql server or called the right Stored Procedure and so on, these are all right. i did not use session or cache anywhere.
then i use another way to gather the data from sql server. i found if i changed sqlcommand type from Stored Procedure to Text and used the sql script directly, this mean by create a SqlCommand object and stored the Stored Procedure's content to the object, the exporting works fine. the 2 fields shown nothing as the Stored Procedure executing in sql server.
i thought this situation could nerver happen, but i really meet this today, hope any one could give me some advise and explain how could it happen.
Thanks & Regards
Posted
Comments
thatraja 25-Jun-10 17:03pm    
You should post the query/code which you have tried because without required details we can't able to help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900