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