Hi all, I am creating a asp .net page which make reference to Microsoft office interop assembly. However, exception occur when it runs. The exception is access denied. However to solve this problem? Thanks. P.S. I have add <%@ Page language="c#" AspCompat="True" to the aspx page and add to the web.config file. However, it still not work.
ting668
Posts
-
How to create powerpoint application object in a aspx page? -
Is there any API for powerpoint file programming in .net?Hello, Of course, I would not like others downloading the powerpoint files from the server without the access right. I heard from my friend office should not be installed on a server. Is it true? That means I cannot install office on the server so I cannot use the office interop assembly? There is an alternative that I could turn a powerpoint file to an XML file. Is there any API for .net programming to do such thing? I have found a api call PowerML but it is a java library. Thanks
-
Is there any API for powerpoint file programming in .net?Hi, Is there any API for powerpoint file programming in .net? If using Office Interop assembly, is it necessary to install office in the system? Since i would like to implement a server for powerpoint file retrieval and do not like installing office in a server. Thanks:)
-
ado problemYes, but it only set the database password but what is the login?
-
ado problemAsp connect to ado/ms access file string is like that conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("testing.mdb") & ";UID=Admin;PWD=password" How to set the UID and PWD for the "testing.mdb"? I have tried to set them up with MS Access but it's fail. Thanks
-
Release unmanaged code memory by managed codeHi I write a program which P/Invoke a unmanaged function calling "CreateWindow(..)" to create a window and the window handle is a global variable at the unmanaged side. When the managed program stop, how to destory the window to free the memory? Or the window will dispose after the caller program stop? Thanks
-
P/Invoke memory leakageHi all, I p/Invoke a VC++ dll in C#, but there is serious memory leak, how can I fix the memory leakage by the VC++ dll caused by P/Invoke ? (the leakage seem not come from the internal C++ code inside the dll, so I suspect it come from the loading and unloading of the dll in C#) Thanks
-
p Invoke memory releaseHi all, I p/Invoke a VC++ dll in C#, but there is serious memory leak, how can I fix the memory leakage by the VC++ dll caused by P/Invoke ? (the leakage seem not come from the internal C++ code inside the dll, so I suspect it come from the loading and unloading of the dll in C#) Thanks
-
p/Invoke memory releaseHi all, I p/Invoke a VC++ dll in C#, but there is serious memory leak, how can I fix the memory leakage by the VC++ dll caused by P/Invoke ? (the leakage seem not come from the internal C++ code inside the dll, so I suspect it come from the loading and unloading of the dll in C#) Thanks
-
release memory usedHi all, How can I release the memory used by the following class in VC++ ? 1. Handle (file handle) 2. IStream Thanks
-
Join Table in 2 different database filesOh Iam sorry. I miss to mention. I would like to write a sql statement that can join 2 tables and 1 is assoicated by one connection and 1 is assoicated by another connection. Is it suitable to use "database_name.dbo.table_name" with SQL Ce Server 2000? Also what is the database name and dbo? Can I get some examples? Thanks
-
Join Table in 2 different database filesHi all~ How do I write a Sql Statement that joining 2 tables which in 2 different database files respectively? Thanks
-
.Net Rollback questionHi all~
public void RunSqlTransaction(string myConnString) { SqlConnection myConnection = new SqlConnection(myConnString); myConnection.Open(); SqlCommand myCommand = myConnection.CreateCommand(); SqlTransaction myTrans; // Start a local transaction myTrans = myConnection.BeginTransaction(); // Must assign both transaction object and connection // to Command object for a pending local transaction myCommand.Connection = myConnection; myCommand.Transaction = myTrans; try { myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')"; myCommand.ExecuteNonQuery(); myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')"; myCommand.ExecuteNonQuery(); myTrans.Commit(); Console.WriteLine("Both records are written to database."); } catch(Exception e) { try { **myTrans.Rollback();** } catch (SqlException ex) { if (myTrans.Connection != null) { Console.WriteLine("An exception of type " + ex.GetType() + " was encountered while attempting to roll back the transaction."); } } Console.WriteLine("An exception of type " + e.GetType() + " was encountered while inserting the data."); Console.WriteLine("Neither record was written to database."); } finally { myConnection.Close(); } }
(e.g from msdn) Is it necessary to call Rollback method inside the "catch"? For example, the second sql statment fail to execute and throw an exception and branch to catch. The Commit method not yet execute and the data not yet insert to the database. So call rollback method is not necessary , isn't it? Thanks -
C# operator overloadingWhat is the syntax of overloading "[]" for a arraylist extended class? Thanks
-
2 thread use the same database connection to do transactionThen how about 2 thread hold 2 objects respectively and the objects contains a database connection respectively and the 2 connections are different object reference but they also connect to the same database? Will exception be thrown if the 1 object is doing transaction and the other object try to connect to the database?
-
2 thread use the same database connection to do transactionHi Is there any problem if 2 threads use the same database SQL Server CE 2000 connection do transaction at the same time? If 1 threads capture the right to do the transaction, then is the other thread will wait for access or what others happen? Thanks
-
2 threads use the same database connection to do transaction...Hi Is there any problem if 2 threads use the same database SQL Server CE 2000 connection do transaction at the same time? If 1 threads capture the right to do the transaction, then is the other thread will wait for access or what others happen? Thanks
-
how to lock a method in classHi Health, Class class1 { public void MethodA() { lock (this) { MethodB(); } } public void MethodB() { lock (this) { ... } } } From the code above, statements in locking block of MethodB still successfully run which is branched within the lock from MethodA. Why it is not a counter example of the locking theroy of the point1 : Then using the same reference of a instance of class1, after calling MethodA and MethodA not yet finished executing within the lock, MethodB still can be called unless lock(this) is also used in MethodB? of the last reply? Thanks
-
how to lock a method in classHI "Unless a method also calls lock(this) or otherwise locks whatever object this refers to, the method can run in a separate thread (not in the current thread, of course, since you're already executing a method)." That means if a class like this below:
Class class1 { public void MethodA(){ lock(this) { ... } } public void MethodB() { ... } }
Then using the same reference of a instance of class1, after calling MethodA and MethodA not yet finished executing within the lock, MethodB still can be called unless lock(this) is also used in MethodB? Also is that the static method will be automatically synchronized and special keyword and code (e.g lock) is not needed to be implemented? Is lock useless for single thread programming? Thanks -
how to lock a method in classHi all, I want to lock a particular method of the object, so it allows only single access of the method at one time. But by using lock(this) to the method will cause the whole object to be locked, so other methods can't be used. What can I do to lock the particular method only ? Thanks