-
WSgdrezek
AskWoody LoungerHi Joe,
Yes I did try, and have switched to, using the powershell command (instead of calling powershell from a batch file). I mentioned it (it was hiding between a couple of quotes — sorry I didn’t make it clearer) a couple of threads back and was questioning the first line in that article you referred to me……wondering if it implied that since this script is acting locally, and not externally, that it would not work in this case?
I’m still hoping I can find a workaround because I’d really like to have these scripts run via the Task Scheduler (rather than using SQL Server Agent jobs) on a machine that is not tasked with SQL Server as well.
Thank you again.
gdr
-
WSgdrezek
AskWoody LoungerHi Joe,
I did find an answer to the “conundrum” I had with the following:It may also be worth looking at Windows PowerShell Tip: Getting Rid of a COM Object (Once and For All).
The trick was to release each object in turn….as in the code below:
Code:$xl = New-Object -ComObject Excel.Application $Wkbk = $xl.Workbooks.Add() $WkSh = $Wkbk.Worksheets.Item(1) $xl.Visible = $True $file = "C:JobsScriptsExcelFilesTest.xlsx" $Wkbk.SaveAs($file) Start-Sleep 5 $Wkbk.Close() $xl.Quit() [System.Runtime.Interopservices.Marshal]::ReleaseComObject($WkSh) | out-null [System.Runtime.Interopservices.Marshal]::ReleaseComObject($Wkbk) | out-null [System.Runtime.Interopservices.Marshal]::ReleaseComObject($xl) | out-null [GC]::Collect() Remove-Variable WkSh Remove-Variable Wkbk Remove-Variable xl
Thanks for your help. I’m still searching for the Task Scheduler solution though……
gdr
-
WSgdrezek
AskWoody LoungerHi Joe,
Do you use the noprofile option on the pwoershell command. See Running PowerShell Scripts as a Service – Power Tips – PowerShell.com.
No I hadn’t. I’ve been trying it out…I’ve gotten rid of the batch file and setup a powershell only task in Task Scheduler, with no change in results.
Code:powershell.exe -noprofile -command "& 'C:JobsScriptsScriptFilesAgentJobStatusEmail.ps1' "
Also, the first line in the article states:
You should call powershell.exe with the options -noprofile -command like this to run a PowerShell script externally
So I wonder, is this implying that since this script is acting locally this would not work?
It may also be worth looking at Windows PowerShell Tip: Getting Rid of a COM Object (Once and For All).
Thanks for this! I’ve actually noticed this, but had not paid any attention to it. I’ve found that this works
Code:$x = New-Object -com Excel.Application $x.Visible = $True Start-Sleep 5 $x.Quit() [System.Runtime.Interopservices.Marshal]::ReleaseComObject($x) Remove-Variable x
but when I add
Code:$Wkbk = $x.Workbooks.Add() $St = $Wkbk.Worksheets.Item(1)
to make
Code:$x = New-Object -com Excel.Application $Wkbk = $x.Workbooks.Add() $St = $Wkbk.Worksheets.Item(1) $x.Visible = $True Start-Sleep 5 $x.Quit() [System.Runtime.Interopservices.Marshal]::ReleaseComObject($x) Remove-Variable x
Excel still remains resident. I can still see the Excel process running using Task Manager. Further testing found that with only the line $St = $Wkbk.Worksheets.Item(1) commented out
Code:$x = New-Object -com Excel.Application $Wkbk = $x.Workbooks.Add() #$St = $Wkbk.Worksheets.Item(1) $x.Visible = $True Start-Sleep 5 $x.Quit() [System.Runtime.Interopservices.Marshal]::ReleaseComObject($x) Remove-Variable x
The Excel object would be released and Excel closed. So adding a worksheet makes that code fail.
I’m still plugging away…..Thank you very much.
-
WSgdrezek
AskWoody LoungerHi Joe,
For this I set the execution policy to unrestricted.
Thanks. -
WSgdrezek
AskWoody LoungerHi Peter,
Thank you.
I do format, highlight, etc. during the excel workbook creation, but a csv file is not totally out of the question….it’s just not as pretty and harder to find the failures and/or did not runs. I also am bouncing about the idea of just gathering the data, shoving it into a table and using Reporting Services for a scheduled, delivered report. -
WSgdrezek
AskWoody LoungerThanks Hans,
I knew it had to something rather simple I’d overlooked. I didn’t even look at how I called the form. I have been out of touch for a while.gdr
-
WSgdrezek
AskWoody LoungerHi Hans,
The popform in question is popfrmViews, command button . The popform that works is popfrmTables, command button . both are on the sbfrmServerDatabases.
The original db is in Acc2007 (I know I forgot to note that in the original post — been out of touch for a while), but I converted this into Acc2003 and the inability to make a selection is still present.
Thank you.gdr
-
WSgdrezek
AskWoody LoungerHere’s a bunch more carved melons!
-
WSgdrezek
AskWoody LoungerThey were seen here first: New Zealand
-
WSgdrezek
AskWoody LoungerDecember 11, 2008 at 2:32 am in reply to: Doing a filter on a SQL linked table (Access 2003 SP3) #1137396Hi Pat,
Sorry for the misunderstanding.
I’ve just now been able to test this on a virtual computer using SQL Server 2005 Express (from previous posts I am assuming this is what you are using) and Acc2003 and I am not getting the same results as you are. (right clicking to filter on the field). (btw, it seems to not matter, when right clicking on a field, entering your filter criteria into the textbox for “Filter for:” and using or not using # for dates or using, or not, double quotes around a string).
Since you’ve mentioned that you are composing a query I checked that out as well. There also I do not receive the mixed results as you are seeing. So I guess I don’t understand what is happening. What are the “sprinkling of other records as well” when filtering with LIPITOR? Are they similar or way out, such as returning ASPIRIN?
Thanks. -
WSgdrezek
AskWoody LoungerDecember 10, 2008 at 5:26 pm in reply to: Doing a filter on a SQL linked table (Access 2003 SP3) #1137291Hi Pat,
On further thought, right clicking on a field I am dimly remembering it does not require delimiters; i.e. quotation marks, #, *, etc. I think the odbc connector should handle the correct method to present the filter to SQL Server. The rest of the previous reply does hold though for ADO and ADP’s. -
WSgdrezek
AskWoody LoungerDecember 10, 2008 at 5:10 pm in reply to: Doing a filter on a SQL linked table (Access 2003 SP3) #1137290Hi Pat,
It has been some time since I’ve used Acc03 but “I think” what you are doing requires the same delimiters/symbols as does SQL Server. Dates are delimited by single quotes……’7/8/08′ (without a time part SQL will assume 12:00 midnight) as dates are string values in SQL Server and the Wild Card character is a % not the *……..”LIPITOR%”. I know SQL requires these when using ADO or an ADP, but as I said it has been some time (well a long time really) since using 2003. Acc07 changed the right-click filter on a table field significantly concerning dates. Here are a couple of links that may help you a bit. TechRepublic and Utter Access -
WSgdrezek
AskWoody LoungerDecember 8, 2008 at 11:20 am in reply to: SQL Configure Report Server error (Access 2003 SP3) #1136641Hi Pat,
Open Internet Information Services Manager through Administrative Tools (there is either a short cut to Administrative Tools via the Start Menu or through the Control Panel). Open the tree on the left until you see Default Web Site. Then if it is stopped you will see (Stopped) and if so, right click on Default Web Site and choose Start. Actually, it might be a good idea to restart IIS. You can do that through the same right click menu or open a Command Prompt and type iisreset.
This may all be moot if you’re unable to restart SQL Server. Can you restart it by opening SQL Configuration Manager? While you’re there what condition does it show for Reporting Services? -
WSgdrezek
AskWoody LoungerDecember 6, 2008 at 6:18 pm in reply to: SQL Server 2005 Update problem (Windows SQL Server 2005 (SP2)) #1136286Glad to hear you’ve got a handle on the problem. What was the permissions issue, if I may ask?
-
WSgdrezek
AskWoody LoungerDecember 6, 2008 at 6:15 pm in reply to: SQL Configure Report Server error (Access 2003 SP3) #1136285Hi Pat,
I apologize, I’ve been at the busy state as well and haven’t been able to make the time to answer your previous reply.
If you open the SQL Server Configuration Manager () under SQL Server 2005 Services are SQL Server Reporting Services listed as “Running”? If not right click and select Start. Also, since that Run command is an IIS command, check and see if your Default Web Site is running. If it isn’t you will see (Stopped) beside it, so right click it and select Start.As a last resort
If all this, including the previous suggestions, haven’t worked, I’m tempted to suggest to uninstall it all and try, try again and start from as close to scratch as you possibly can. I’ve had to do that as well until I’ve gotten the proper precedure down. Rather than chase down permissions errors, etc. I just blow everything away. I remove everything related to SQL Server through Add or Remove Programs and delete it’s folders (C:Program FilesMicrosoft SQL Server) which will also delete the 2 Reporting Services databases, then delete the 2 Reporting Services’ virtual directories in IIS and I’ve even uninstalled IIS and re-installed it. I know this can seem as a rather harse “fix”, but when I’m finished and it does work, I am reasonably certain that I’ve got a clean install and should not have any further problems.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Fedora Linux is now an official WSL distro
by
Alex5723
8 minutes ago -
May 2025 Office non-Security updates
by
PKCano
34 minutes ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
2 hours, 30 minutes ago -
pages print on restart (Win 11 23H2)
by
cyraxote
1 hour, 46 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
4 hours, 42 minutes ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
4 hours, 43 minutes ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
12 hours, 4 minutes ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
1 hour, 47 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
23 hours, 25 minutes ago -
How much I spent on the Mac mini
by
Will Fastie
1 hour, 57 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
36 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
1 day, 5 hours ago -
Setting up Windows 11
by
Susan Bradley
20 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
1 day ago -
Powershell version?
by
CWBillow
1 day, 1 hour ago -
SendTom Toys
by
CWBillow
9 hours, 54 minutes ago -
Add shortcut to taskbar?
by
CWBillow
1 day, 5 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
1 day, 21 hours ago -
How can I install Skype on Windows 7?
by
Help
1 day, 20 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
1 day, 3 hours ago -
We live in a simulation
by
Alex5723
2 days, 12 hours ago -
Netplwiz not working
by
RetiredGeek
1 day, 22 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
3 days ago -
Microsoft is killing Authenticator
by
Alex5723
2 hours, 20 minutes ago -
Downloads folder location
by
CWBillow
3 days, 6 hours ago -
Remove a User from Login screen
by
CWBillow
2 days, 2 hours ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
2 days, 22 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
2 days, 22 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
1 day ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
2 days, 21 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.