473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Problem with MSSQL and C# automation Addin

1
Hi, there
I created C# automation excel add-in named "MyExcelAddin" like that link.
http://msdn.microsoft.com/en-us/libr...89(VS.80).aspx

"MyExcelAddin.MyClass1" contains one function:
Expand|Select|Wrap|Line Numbers
  1. public string GetName()
  2. {     
  3. return  "Employee";
  4. }
  5.  
I can use this function in excel like that.
In Selected Cell , =GetName(). It works well.

So, I try one thing like that
I created a DLL named "MyDBDLL" that connected directly with MSSQL database server.
"MyDBDLL.MyClass2" contains one function:
Expand|Select|Wrap|Line Numbers
  1. public string[] GetNames()
  2. {
  3. string[] srtArr;
  4. //....my code are here...
  5. // i assigned strArr names from MSSQL database
  6. return strArr;
  7. }
  8.  
I also created XML file for "MYDBDLL" dll.
And in "MyExcelAddin.MyClass1" , I change my code like that
Expand|Select|Wrap|Line Numbers
  1. public string GetName()
  2. {
  3. MyDBDLL.MyClass2 CL2 = new MyDBDLL.MyClass2();
  4. string[] st = CL2.GetNames();
  5. return  st[0];
  6. }
  7.  
At that time, In excel , I cannot use like that .
In Seletced Cell, =GetName(). It gived no result.
But I test "MyExcelAddin" DLL in Console Application. It works well.
How can i solve this problem...? Please help me.
Thanks You Very Much.
Jul 3 '08 #1
1 1113
Curtis Rutland
3,256 Expert 2GB
Welcome to Bytes!

We appreciate it if you wrap your code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. And if it's easier for us to read, it's easier for us to help.

You can type them in or use the # button on the text editor.

MODERATOR
Jul 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
0
by: Samuel Bernard | last post by:
Hi, I created an addin for Outlook 2003. It creates a menu in Outlook in order to allow the user to access severals options of our Web site. I use MsiInstaller of MS to install this addin which...
6
by: Frank X | last post by:
Excel 2002 introduced a capability to add custom worksheet functions to Excel direct from a COM/ActiveX object. I can use C# to develop a COM object which I can use fine from Excel/VBA, however...
7
by: Joseph Geretz | last post by:
I've been working on an Addin for Outlook in C#. It hasn't been long now, just a couple of days. Suddenly though, running my project in Debug launches Outlook as specified, but no breakpoints...
3
by: Tim Marsden | last post by:
Hi, I am currently creating an instance of Excel using VB.NET Automation. dim xl as Excel.Application xl = new Excel.Application However, how can I have more control over the starting of...
19
by: Larry Smith | last post by:
Hi there, When I run the following on my app's primary thread: System.Type.GetType("System.Windows.Forms.Form") It works as expected. If I then launch a thread via the "BackgroundWorker"...
1
by: Rainer Queck | last post by:
Hello NG, I moved my AddIn Project from one machine to a other. This AddIn is a AddIn for Visual Studio 2005.
0
by: My interest | last post by:
How to supply help messages for C# based Excel Automation Add-In? (i.e. those will appear on the Insert Function Wizard Dialog box) Thanks.
0
by: ppardi | last post by:
I'm developing an addin for Word 2007 and I need to determine whether a user saves a Word 2007 document in an older format (97-2003) after a save as is done. The scenario is that the user starts...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.