Showing posts with label ideas. Show all posts
Showing posts with label ideas. Show all posts

Friday, March 30, 2012

Running Access XP Macro with script task

I found this and have done everything it says to do, but I can't get the script to compile. Any ideas on how to run a access macro in SSIS?

Baiscally to execute an Access Macros in SSIS package we need to Download

Microsoft.Office.Interop.Access DLL from Office XP PIAs.

Download site

http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en

1) Extract the Microsoft.Office.Interop.Access DLL from Oxppia.exe

2) Drag and Drop Microsoft.Office.Interop.Access DLL to Global Assembley Directory(GAC) ie: C:\WINNT\assembly for Windows 2000 -- C:\WINDOWS\assembly for ( Win Xp and Win 2003)

3) Copy paste Microsoft.Office.Interop.Access to C:\WINNT\Microsoft.NET\Framework\v2.0.50727 for Windows 2000 -- C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 ( Win Xp and Win 2003)

4) Add DLL reference in the Script Task

5) Add the below Code

1) Create a New Project in SSIS

2) Drag and Drop Script Task

3) Copy Paste the code in script task editor

Imports Microsoft.Office.Interop.Access

Try

Dim objAccess As New Access.Application

objAccess.OpenCurrentDatabase("D:\TestMacro.mdb", False) ' Add the Access File Path

objAccess.DoCmd.RunMacro("Macro1") ' Replace Macro1 with the name of your macro

objAccess.CloseCurrentDatabase()

objAccess.Quit(Access.AcQuitOption.acQuitSaveNone)

objAccess = Nothing

Catch ex As Exception

System.Windows.Forms.MessageBox.Show(ex.ToString())

End Try

Dts.TaskResult = Dts.Results.Success

I actually figured this out. Had to reference alot more than just the access dll. Below is the final code to get it to work if anyone else wants to do something like this.

Imports System

Imports System.Data

Imports System.Math

Imports Microsoft.SqlServer.Dts.Runtime

Imports Microsoft.Office.Interop.Access

Imports ADODB

Imports dao

Imports mscomctl

Imports msdatasrc

Imports stdole

Imports Microsoft.Office.Interop

Imports Microsoft.Office.Interop.OWC

PublicClass ScriptMain

' The execution engine calls this method when the task executes.

' To access the object model, use the Dts object. Connections, variables, events,

' and logging features are available as static members of the Dts class.

' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.

'

' To open Code and Text Editor Help, press F1.

' To open Object Browser, press Ctrl+Alt+J.

PublicSub Main()

'

Try

Dim objAccess AsNew Access.Application

objAccess.OpenCurrentDatabase("D:MyDB.mdb", False) ' Add the Access File Path

objAccess.DoCmd.RunMacro("Macro1") 'Add your Macro name

objAccess.CloseCurrentDatabase()

objAccess.Quit(Access.AcQuitOption.acQuitSaveNone)

objAccess = Nothing

Catch ex As Exception

System.Windows.Forms.MessageBox.Show(ex.ToString())

EndTry

Dts.TaskResult = Dts.Results.Success

EndSub

EndClass

Tuesday, February 21, 2012

RSS Search

Hi! I'm looking for ideas on what would the best approach to design a
search system for a RSS feeds. I will have some 50 RSS feeds (all RSS
2.0 compliant) stored locally on the web server. Now I'm wondering
what would the best method to allow searching of these RSS files.
Since the search will cater to multiple users the search system has to
be robust and efficient. Some ideas that I have for the RSS search
system are:
1. Store all RSS files locally on the web server file system and
perform file system queries. But I guess this might get slow when a
number of users try to search. Moreover, the queries may not be
extensible (for example to allow boolean operations etc).
2. Move the RSS data to the database and then search perform search
using LIKE (or the more advanced indexing service features).
3. Use a 3rd party full-text search engine like Lucene.
4. Use something like XQuery or XPath to query the RSS files directly
but this again *might* (not sure since I haven't worked with either)
get slow when a number of users try to search.
Also, the RSS files I have on the web server will be updated every
hour or so.
So, I have the ideas but I'm not quite sure which one would the most
suitable and efficient. If anyone has ideas on implementing such a
search system for RSS feeds then please share your insight. Thank you
guys!
You might want to shread the XML docs/RSS feeds and store them in a
relational database and FTI the columns of interest and query them there.
I would advise against storing them in the file system or storing them in
XML format in the image type columns. Although Indexing Services and SQL FTS
does support querying XML/RSS feeds using the XML iFilter, you can't index
properties using SQL Server FTS, and Indexing Services support isn't much
better.
You could index the XML/RSS as text but there are some problems indexing the
XML tags.
XQuery FTS support will be supplied when SQL 2005 which will RTM next year.
Please refer to:
http://msdn.microsoft.com/xml/defaul.../sql2k5xml.asp
for more info.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"RiceGuy" <9icj4u613jeqrx8@.jetable.org> wrote in message
news:d7851925.0407242144.30e9c55f@.posting.google.c om...
> Hi! I'm looking for ideas on what would the best approach to design a
> search system for a RSS feeds. I will have some 50 RSS feeds (all RSS
> 2.0 compliant) stored locally on the web server. Now I'm wondering
> what would the best method to allow searching of these RSS files.
> Since the search will cater to multiple users the search system has to
> be robust and efficient. Some ideas that I have for the RSS search
> system are:
> 1. Store all RSS files locally on the web server file system and
> perform file system queries. But I guess this might get slow when a
> number of users try to search. Moreover, the queries may not be
> extensible (for example to allow boolean operations etc).
> 2. Move the RSS data to the database and then search perform search
> using LIKE (or the more advanced indexing service features).
> 3. Use a 3rd party full-text search engine like Lucene.
> 4. Use something like XQuery or XPath to query the RSS files directly
> but this again *might* (not sure since I haven't worked with either)
> get slow when a number of users try to search.
> Also, the RSS files I have on the web server will be updated every
> hour or so.
> So, I have the ideas but I'm not quite sure which one would the most
> suitable and efficient. If anyone has ideas on implementing such a
> search system for RSS feeds then please share your insight. Thank you
> guys!
|||You may want xquery friendly database like sql2005. You have xml typed
field. e.g.
create table table1 (i int, x xml)
Now you can directly xquery the xml field like,
select i, x from table1 where x.exist(xquery)
Free download is,
http://lab.msdn.microsoft.com/express/sql/
"RiceGuy" <9icj4u613jeqrx8@.jetable.org> wrote in message
news:d7851925.0407242144.30e9c55f@.posting.google.c om...
> Hi! I'm looking for ideas on what would the best approach to design a
> search system for a RSS feeds. I will have some 50 RSS feeds (all RSS
> 2.0 compliant) stored locally on the web server. Now I'm wondering
> what would the best method to allow searching of these RSS files.
> Since the search will cater to multiple users the search system has to
> be robust and efficient. Some ideas that I have for the RSS search
> system are:
> 1. Store all RSS files locally on the web server file system and
> perform file system queries. But I guess this might get slow when a
> number of users try to search. Moreover, the queries may not be
> extensible (for example to allow boolean operations etc).
> 2. Move the RSS data to the database and then search perform search
> using LIKE (or the more advanced indexing service features).
> 3. Use a 3rd party full-text search engine like Lucene.
> 4. Use something like XQuery or XPath to query the RSS files directly
> but this again *might* (not sure since I haven't worked with either)
> get slow when a number of users try to search.
> Also, the RSS files I have on the web server will be updated every
> hour or so.
> So, I have the ideas but I'm not quite sure which one would the most
> suitable and efficient. If anyone has ideas on implementing such a
> search system for RSS feeds then please share your insight. Thank you
> guys!
|||RiceGuy,
In addition to what Hilary has recommend, the following web article
"Creating SQL Based RSS Feed ..." at http://www.sswug.org/see/18299 defines
a sample table and data along with a stored proc "GenerateRssFeed" and then
use:
Execute the below sql script to generate the RSS feed.
sp_makewebtask @.outputfile = 'C:Rss.xml', -- Point 1
@.query = 'Exec GenerateRssFeed', -- Put the SP name here
@.templatefile = 'C:RssFeedTemplate.xml' -- Point 2
The article is good and directly explains how RSS feed can be generated
directly from SQL Server 2000. The above web article can also be found at
http://www.dotnetforce.com/(0eqeob4525xs2h55fmagg3zz)/Content.aspx?t=a&n=204
If you're interested in the XQuery support (but not the FTS component), you
might want to review the newly released beta version of SQL Sever 2005
Express, the MSDE 2000 replacement at:
http://lab.msdn.microsoft.com/express/sql/default.aspx
Regards,
John
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:uSVlTCkcEHA.4092@.TK2MSFTNGP11.phx.gbl...
> You might want to shread the XML docs/RSS feeds and store them in a
> relational database and FTI the columns of interest and query them there.
> I would advise against storing them in the file system or storing them in
> XML format in the image type columns. Although Indexing Services and SQL
FTS
> does support querying XML/RSS feeds using the XML iFilter, you can't index
> properties using SQL Server FTS, and Indexing Services support isn't much
> better.
> You could index the XML/RSS as text but there are some problems indexing
the
> XML tags.
> XQuery FTS support will be supplied when SQL 2005 which will RTM next
year.
> Please refer to:
>
http://msdn.microsoft.com/xml/defaul.../sql2k5xml.asp
> for more info.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "RiceGuy" <9icj4u613jeqrx8@.jetable.org> wrote in message
> news:d7851925.0407242144.30e9c55f@.posting.google.c om...
>

RSS Search

Hi! I'm looking for ideas on what would the best approach to design a
search system for a RSS feeds. I will have some 50 RSS feeds (all RSS
2.0 compliant) stored locally on the web server. Now I'm wondering
what would the best method to allow searching of these RSS files.
Since the search will cater to multiple users the search system has to
be robust and efficient. Some ideas that I have for the RSS search
system are:
1. Store all RSS files locally on the web server file system and
perform file system queries. But I guess this might get slow when a
number of users try to search. Moreover, the queries may not be
extensible (for example to allow boolean operations etc).
2. Move the RSS data to the database and then search perform search
using LIKE (or the more advanced indexing service features).
3. Use a 3rd party full-text search engine like Lucene.
4. Use something like XQuery or XPath to query the RSS files directly
but this again *might* (not sure since I haven't worked with either)
get slow when a number of users try to search.
Also, the RSS files I have on the web server will be updated every
hour or so.
So, I have the ideas but I'm not quite sure which one would the most
suitable and efficient. If anyone has ideas on implementing such a
search system for RSS feeds then please share your insight. Thank you
guys!
I'm not surprised to see nobody has responded to your questions.
I'm working on the same type of issues and all I have learned so
far is that SQL Server 2000 would require 'shredding' the data
and putting it into the database where the server could be used
to return results all other current options not being performance
friendly.
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET csgallagher@.REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
"RiceGuy" <9icj4u613jeqrx8@.jetable.org> wrote in message
news:d7851925.0407242150.380d929a@.posting.google.c om...
> Hi! I'm looking for ideas on what would the best approach to design a
> search system for a RSS feeds. I will have some 50 RSS feeds (all RSS
> 2.0 compliant) stored locally on the web server. Now I'm wondering
> what would the best method to allow searching of these RSS files.
> Since the search will cater to multiple users the search system has to
> be robust and efficient. Some ideas that I have for the RSS search
> system are:
> 1. Store all RSS files locally on the web server file system and
> perform file system queries. But I guess this might get slow when a
> number of users try to search. Moreover, the queries may not be
> extensible (for example to allow boolean operations etc).
> 2. Move the RSS data to the database and then search perform search
> using LIKE (or the more advanced indexing service features).
> 3. Use a 3rd party full-text search engine like Lucene.
> 4. Use something like XQuery or XPath to query the RSS files directly
> but this again *might* (not sure since I haven't worked with either)
> get slow when a number of users try to search.
> Also, the RSS files I have on the web server will be updated every
> hour or so.
> So, I have the ideas but I'm not quite sure which one would the most
> suitable and efficient. If anyone has ideas on implementing such a
> search system for RSS feeds then please share your insight. Thank you
> guys!
|||You could use SQL Server 2005's XML datatype and XQuery support (it is
currently in Beta2).
Best regards
Michael
"clintonG" <csgallagher@.REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:O$NsSgvfEHA.3428@.TK2MSFTNGP11.phx.gbl...
> I'm not surprised to see nobody has responded to your questions.
> I'm working on the same type of issues and all I have learned so
> far is that SQL Server 2000 would require 'shredding' the data
> and putting it into the database where the server could be used
> to return results all other current options not being performance
> friendly.
> --
> <%= Clinton Gallagher, "Twice the Results -- Half the Cost"
> Architectural & e-Business Consulting -- Software Development
> NET csgallagher@.REMOVETHISTEXTmetromilwaukee.com
> URL http://www.metromilwaukee.com/clintongallagher/
>
> "RiceGuy" <9icj4u613jeqrx8@.jetable.org> wrote in message
> news:d7851925.0407242150.380d929a@.posting.google.c om...
>
|||I've got it loaded on another disk and have to re-cable to get
to it so it happens infrequently but its good to know this task
is going to become easier. Thanks for bringing it to my attention.
I'll certainly have to study 2005 features as I've asked for
comments at news://microsoft.public.sqlserver.programming to
discuss how others are 'shredding' XML data into SQL Server.
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET csgallagher@.REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
"Michael Rys [MSFT]" <mrys@.online.microsoft.com> wrote in message
news:ORkRIiJgEHA.380@.TK2MSFTNGP10.phx.gbl...
> You could use SQL Server 2005's XML datatype and XQuery support (it is
> currently in Beta2).
> Best regards
> Michael
> "clintonG" <csgallagher@.REMOVETHISTEXTmetromilwaukee.com> wrote in message
> news:O$NsSgvfEHA.3428@.TK2MSFTNGP11.phx.gbl...
>

RSS Search

Hi! I'm looking for ideas on what would the best approach to design a
search system for a RSS feeds. I will have some 50 RSS feeds (all RSS
2.0 compliant) stored locally on the web server. Now I'm wondering
what would the best method to allow searching of these RSS files.
Since the search will cater to multiple users the search system has to
be robust and efficient. Some ideas that I have for the RSS search
system are:

1. Store all RSS files locally on the web server file system and
perform file system queries. But I guess this might get slow when a
number of users try to search. Moreover, the queries may not be
extensible (for example to allow boolean operations etc).

2. Move the RSS data to the database and then search perform search
using LIKE (or the more advanced indexing service features).

3. Use a 3rd party full-text search engine like Lucene.

4. Use something like XQuery or XPath to query the RSS files directly
but this again *might* (not sure since I haven't worked with either)
get slow when a number of users try to search.

Also, the RSS files I have on the web server will be updated every
hour or so.

So, I have the ideas but I'm not quite sure which one would the most
suitable and efficient. If anyone has ideas on implementing such a
search system for RSS feeds then please share your insight. Thank you
guys!I'm not surprised to see nobody has responded to your questions.
I'm working on the same type of issues and all I have learned so
far is that SQL Server 2000 would require 'shredding' the data
and putting it into the database where the server could be used
to return results all other current options not being performance
friendly.

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET csgallagher@.REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"RiceGuy" <9icj4u613jeqrx8@.jetable.org> wrote in message
news:d7851925.0407242150.380d929a@.posting.google.c om...
> Hi! I'm looking for ideas on what would the best approach to design a
> search system for a RSS feeds. I will have some 50 RSS feeds (all RSS
> 2.0 compliant) stored locally on the web server. Now I'm wondering
> what would the best method to allow searching of these RSS files.
> Since the search will cater to multiple users the search system has to
> be robust and efficient. Some ideas that I have for the RSS search
> system are:
> 1. Store all RSS files locally on the web server file system and
> perform file system queries. But I guess this might get slow when a
> number of users try to search. Moreover, the queries may not be
> extensible (for example to allow boolean operations etc).
> 2. Move the RSS data to the database and then search perform search
> using LIKE (or the more advanced indexing service features).
> 3. Use a 3rd party full-text search engine like Lucene.
> 4. Use something like XQuery or XPath to query the RSS files directly
> but this again *might* (not sure since I haven't worked with either)
> get slow when a number of users try to search.
> Also, the RSS files I have on the web server will be updated every
> hour or so.
> So, I have the ideas but I'm not quite sure which one would the most
> suitable and efficient. If anyone has ideas on implementing such a
> search system for RSS feeds then please share your insight. Thank you
> guys!