Sunday, March 25, 2012
Access Class Library from Excel 97
library from Excel 97 ? I've tried but receive a runtime error
-2146232576 which means nothing to me, my class is shown below, I've
placed the assembly into the GAC and registered it using RegAsm all to
no avail
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
namespace CallingCSharpFromWord97
{
[ComVisible(true)]
public class PJKWordClass
{
public TextWriter tw = null;
public PJKWordClass()
{
}
public void WriteLogFile(string msg)
{
tw = new StreamWriter("c:\\PJKCalledFromWord97.log", true);
tw.WriteLine(String.Format("This file was created by C# which was
called from a COM client {0} at
{1}",msg,DateTime.Now.ToLongDateString()));
tw.Close();
}
}
}
I can reference the assembly in Excel, but when run, it bombs on the
CreateObject line ( with the error number shown above )
Dim oCSharp As CallingCSharpFromWord97.PJKWordClass
Set oCSharp = CreateObject("CallingCSharpFromWord97.PJKWordClass")
regardsPete Kane wrote:
> Hi All, does anyone know if it's possible to utilise a .NET class
> library from Excel 97 ? I've tried but receive a runtime error
> -2146232576 which means nothing to me, my class is shown below, I've
> placed the assembly into the GAC and registered it using RegAsm all to
> no avail
> using System;
> using System.Collections.Generic;
> using System.Text;
> using System.IO;
> using System.Runtime.InteropServices;
> namespace CallingCSharpFromWord97
> {
> [ComVisible(true)]
> public class PJKWordClass
> {
> public TextWriter tw = null;
> public PJKWordClass()
> {
> }
> public void WriteLogFile(string msg)
> {
> tw = new StreamWriter("c:\\PJKCalledFromWord97.log", true);
> tw.WriteLine(String.Format("This file was created by C# which was
> called from a COM client {0} at
> {1}",msg,DateTime.Now.ToLongDateString()));
> tw.Close();
> }
> }
> }
>
> I can reference the assembly in Excel, but when run, it bombs on the
> CreateObject line ( with the error number shown above )
> Dim oCSharp As CallingCSharpFromWord97.PJKWordClass
> Set oCSharp = CreateObject("CallingCSharpFromWord97.PJKWordClass")
> regards
>
Sorry posted to wrong group :-)sql
Monday, March 19, 2012
Access 2000 Frontend MS SQL 2000 backend - Locking Problems
The safest and easiest way to use locks having to do with SQL Server in a distributed application is to use SQL Server locks themselves. See the links below for information on how SQL Server locks work and how to use them.
http://msdn2.microsoft.com/en-us/library/ms189857.aspx
http://www.informit.com/articles/article.aspx?p=26657&rl=1
http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
http://www.databasejournal.com/features/mssql/article.php/3289661
http://www.sql-server-performance.com/articles/per/advanced_sql_locking_p1.aspx
http://blog.sqlauthority.com/2007/04/27/sql-server-2005-locking-hints-and-examples/
Hope that helps,
John
Access 2000 Frontend MS SQL 2000 backend - Locking Problems
The safest and easiest way to use locks having to do with SQL Server in a distributed application is to use SQL Server locks themselves. See the links below for information on how SQL Server locks work and how to use them.
http://msdn2.microsoft.com/en-us/library/ms189857.aspx
http://www.informit.com/articles/article.aspx?p=26657&rl=1
http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
http://www.databasejournal.com/features/mssql/article.php/3289661
http://www.sql-server-performance.com/articles/per/advanced_sql_locking_p1.aspx
http://blog.sqlauthority.com/2007/04/27/sql-server-2005-locking-hints-and-examples/
Hope that helps,
John
Saturday, February 25, 2012
About SQLClient conters
how can i get the following list of counters
in runtime when we executing the application with
database support and is there any command to find the
no.of connection are made in the database and no.of pooled
connection, no.of non pooled connection for the database.> Hi,
> how can i get the following list of counters
> in runtime when we executing the application with
> database support and is there any command to find the
> no.of connection are made in the database and no.of pooled
> connection, no.of non pooled connection for the database.
>
--
You should look at incorporating Windows Management Instrumentation (WMI)
into your application. This is a place to start:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/
wmi_start_page.asp
Hope this helps,
--
Eric Cárdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.