Author Topic: Using .Net or ActiveX from within a macro  (Read 6654 times)

Absinthe

  • Guest
Using .Net or ActiveX from within a macro
« on: August 08, 2009, 04:32:05 PM »
In the past I wrote a set of tools that let me access many of the SQL Server features like executing TSQL code into a server of my choosing, and getting a list of stored procedures and all that sort of stuff.

I did this by shelling things like isql.exe with appropriate command line arguments and invoking specific DDL or TSQL scripts to accomplish my goal. I build menus and drop downs to let you select your current server username password database and whatever.

Pretty much made SE into Query Analyzer on steroids.

I uninstalled these scripts because I found it a bit slow to work with shelling and capturing output to hard files and all that.

Now I am ready to revisit SE as my primary SQL tool, but in order to do the same things I believe the correct functionality should use SMO or DMO calls. However, I can't seem to find an example of calling out to .NET or ActiveX COMM objects. So am I stuck with only using "SHELL" and some executable?

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: Using .Net or ActiveX from within a macro
« Reply #1 on: August 26, 2009, 10:03:05 AM »
Quote
So am I stuck with only using "SHELL" and some executable?

You might be able to use dde (_ddecommand) or a dll.

Graeme


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: Using .Net or ActiveX from within a macro
« Reply #2 on: August 27, 2009, 02:40:39 PM »
I recommend using a DLL. See samples\simple for a very simple DLL source which extends SlickEdit.

HansNet

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: Using .Net or ActiveX from within a macro
« Reply #3 on: September 08, 2009, 09:31:03 AM »
Are there examples for this dll in VB or VB.NET ? ... I have a selfmade VB dll with a lots of functions that have to be called from SE-macros. Converting it to C++ is no option (too much work).
Is there anybody out there who can help me ?