I use visual developper, and i have installed OWC11 & .NET framework 2.0.
public partial class _Default : System.Web.UI.Page
private void Page_Load(object sender, System.EventArgs e)
//determine whether or not the browser supports OWC
Response.Write("<OBJECT id='pTable' style='Z-INDEX: 109; LEFT: 8px; WIDTH:502px; POSITION: absolute; TOP: 8px; HEIGHT: 217px' height='217' width='502'classid='clsid:0002E55A-0000-0000-C000-000000000046'VIEWASTEXT></OBJECT>");
//cause the object to load data on the client
Response.Write(@"<script>document.all.pTable.ConnectionString ='" + ConfigurationManager.ConnectionStrings["TimeTrackingDB"] + "'</script>");
Response.Write("<script>document.all.pTable.ResourceID = 'RESOURCE'</script>");
PivotTableClass PTClass = new PivotTableClass();
PTClass.ConnectionString = ConfigurationManager.ConnectionStrings["TimeTrackingDB"].ToString();
PTClass.DataMember = "";
PivotView pview = PTClass.ActiveView;
When i'm lauching there is an error : HRESULT E_FAIL
Lets find out whether this is a problem with your pivot tool, or your server connection.
Unfortunately, I can only help you trouble-shoot the connection as I know little or nothing about your application coding.
Are you using SQL Server authentication or Windows authentication to connect to your database server?
If it's not practically useful, then it's practically useless.
I don't much fancy handling the app code either but.... there is an error within the class that is not handled with an exceptioon handler hence you get the call to the property highlighted. Use the debugging tools to step through the code line by line - it will take you through the class and then will error once more at the actual line within the class that is throwing the exception. This might not help us fix the problem but at least let you know if we are capable of fixing the problem or if you need to speak to more .NET enabled people
Indeed, in my web.config, we use this connection string in our overall project and we haven't got any issue with this.
That's why I think there is a mistake in the script of creation of the pivot.
Well if your class is creating invalid SQL then it really is a c# problem rather than a SQL one. As mentioned - the error is to do with your class. Without delving around in your class you are not going to get anywhere. Your code does pretty well nothing but retrieve a connection string, submit it to the class, call a class property and report an error in the class. If you say the connection string is wrong then there is nothing to do but step through your code.