<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Chris Idzerda</title><link>http://blogs.vertigosoftware.com/chris/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 1.1 (Build: 1.1.0.50615)</generator><item><title>Event Logging in Visual Basic 6</title><link>http://blogs.vertigosoftware.com/chris/archive/2005/05/26/Event_Logging_in_Visual_Basic_6.aspx</link><pubDate>Thu, 26 May 2005 20:41:00 GMT</pubDate><guid isPermaLink="false">fcb82b5c-78c7-46a5-b6ff-1ef27e7d7271:932</guid><dc:creator>Chris</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.vertigosoftware.com/chris/comments/932.aspx</comments><wfw:commentRss>http://blogs.vertigosoftware.com/chris/commentrss.aspx?PostID=932</wfw:commentRss><description>&lt;p&gt;This is old-school, but you may be on a project requiring you to
work in VB6 (Jay). You can log events to the NT event log by invoking
the &lt;font face="Monospace"&gt;LogEvent&lt;/font&gt; method on the &lt;font face="Monospace"&gt;App&lt;/font&gt; object.&lt;/p&gt;
&lt;p&gt;VB6 - LogEvent Method&lt;br&gt;
&lt;a href="http://msdn.microsoft.com/library/en-us/vb98/html/vbmthLogEventMethod.asp"&gt;http://msdn.microsoft.com/library/en-us/vb98/html/vbmthLogEventMethod.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It turns out you can only log events from a compiled application. It
won't work if you're running your application from the VB6 environment
for debugging purposes. The following article suggests creating an
ActiveX DLL to hold the logging function.&lt;/p&gt;
&lt;p&gt;INFO: App.LogEvent Only Logs in Compiled Applications&lt;br&gt;
&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;161306"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;161306&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However, this won't work in ASP without some Registry modifications. I don't know about ASP.NET, but again this is old-school.&lt;/p&gt;
&lt;p&gt;PRB: App.Logevent Does Not Work in Components that You Call from ASP on Windows 2000&lt;br&gt;
&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;251264"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;251264&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is a lengthy article devoted to ASP logging.&lt;/p&gt;
&lt;p&gt;How To Log Events from Active Server Pages&lt;br&gt;
&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;301309"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;301309&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also log events to your own file by invoking the &lt;font face="Monospace"&gt;StartLogging&lt;/font&gt; method on the &lt;font face="Monospace"&gt;App&lt;/font&gt; object.&lt;/p&gt;
&lt;p&gt;VB6 - StartLogging Method&lt;br&gt;
&lt;a href="http://msdn.microsoft.com/library/en-us/vb98/html/vbmthstartloggingmethod.asp"&gt;http://msdn.microsoft.com/library/en-us/vb98/html/vbmthstartloggingmethod.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Event logging is available in several contexts. I'm sure everyone
knows how to do it in .NET (and now from VB6), but you can also do it
from script.&lt;/p&gt;
&lt;p&gt;Windows Script Host - LogEvent Method&lt;br&gt;
&lt;a href="http://msdn.microsoft.com/library/en-us/script56/html/wsmthlogevent.asp"&gt;http://msdn.microsoft.com/library/en-us/script56/html/wsmthlogevent.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is the search I used to find out all of this information.&lt;/p&gt;
&lt;p&gt;MSDN search for LogEvent&lt;br&gt;
&lt;a href="http://search.microsoft.com/search/results.aspx?View=msdn&amp;amp;st=a&amp;amp;qu=LogEvent&amp;amp;c=0&amp;amp;s=1"&gt;http://search.microsoft.com/search/results.aspx?View=msdn&amp;amp;st=a&amp;amp;qu=LogEvent&amp;amp;c=0&amp;amp;s=1&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.vertigosoftware.com/aggbug.aspx?PostID=932" width="1" height="1"&gt;</description></item><item><title>Change the font size in VS.NET</title><link>http://blogs.vertigosoftware.com/chris/archive/2005/04/27/891.aspx</link><pubDate>Wed, 27 Apr 2005 16:35:00 GMT</pubDate><guid isPermaLink="false">fcb82b5c-78c7-46a5-b6ff-1ef27e7d7271:891</guid><dc:creator>Chris</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.vertigosoftware.com/chris/comments/891.aspx</comments><wfw:commentRss>http://blogs.vertigosoftware.com/chris/commentrss.aspx?PostID=891</wfw:commentRss><description>&lt;p&gt;I haven't tried it yet, but here is a utility to easily change the
font size in VS.NET. This is great for presentations, such as the VTB
(where someone mentioned wanting such a utility).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.gotdotnet.com/workspaces/workspace.aspx?id=ab7b5f27-f844-43ab-95bd-0b0b2a707d62"&gt;http://www.gotdotnet.com/workspaces/workspace.aspx?id=ab7b5f27-f844-43ab-95bd-0b0b2a707d62&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.vertigosoftware.com/aggbug.aspx?PostID=891" width="1" height="1"&gt;</description></item><item><title>Getting Computer and User Information in Script</title><link>http://blogs.vertigosoftware.com/chris/archive/2005/01/06/Getting_Computer_and_User_Information_in_Script.aspx</link><pubDate>Thu, 06 Jan 2005 19:04:00 GMT</pubDate><guid isPermaLink="false">fcb82b5c-78c7-46a5-b6ff-1ef27e7d7271:751</guid><dc:creator>Chris</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.vertigosoftware.com/chris/comments/751.aspx</comments><wfw:commentRss>http://blogs.vertigosoftware.com/chris/commentrss.aspx?PostID=751</wfw:commentRss><description>&lt;p&gt;You can use the &lt;strong&gt;WScript.Network&lt;/strong&gt; component to get some computer and user information. Here's an example script that displays this information.&lt;/p&gt;&lt;pre&gt;&lt;span&gt;var&lt;/span&gt; x= &lt;span&gt;new&lt;/span&gt; ActiveXObject(&lt;span&gt;"WScript.Network"&lt;/span&gt;);&lt;br&gt;WScript.Echo(x.ComputerName);&lt;br&gt;WScript.Echo(x.UserDomain);&lt;br&gt;WScript.Echo(x.UserName);&lt;/pre&gt;
&lt;p&gt;This component also some methods to manage network drives and printers. See &lt;a href="http://msdn.microsoft.com/library/en-us/script56/html/wsObjWshNetwork.asp"&gt;http://msdn.microsoft.com/library/en-us/script56/html/wsObjWshNetwork.asp&lt;/a&gt; for this and many other objects useful in scripting, such as the &lt;strong&gt;WScript.Shell&lt;/strong&gt; component for accessing the environment and Registry and even sending keystrokes to other applications.&lt;/p&gt;&lt;img src="http://blogs.vertigosoftware.com/aggbug.aspx?PostID=751" width="1" height="1"&gt;</description></item><item><title>Converting Hexadecimal Strings to Numbers</title><link>http://blogs.vertigosoftware.com/chris/archive/2004/10/08/Converting_Hexadecimal_Strings_to_Numbers.aspx</link><pubDate>Sat, 09 Oct 2004 00:16:00 GMT</pubDate><guid isPermaLink="false">fcb82b5c-78c7-46a5-b6ff-1ef27e7d7271:635</guid><dc:creator>Chris</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.vertigosoftware.com/chris/comments/635.aspx</comments><wfw:commentRss>http://blogs.vertigosoftware.com/chris/commentrss.aspx?PostID=635</wfw:commentRss><description>&lt;p&gt;It's easy enough to convert numbers and strings back and forth if
they're decimal, but you have to do a little work if you want to use
hexadecimal. To convert an integer to a hexadecimal string, use&lt;/p&gt;
&lt;p&gt;i.ToString(&lt;font color="fuchsia"&gt;"x"&lt;/font&gt;);&lt;/p&gt;
&lt;p&gt;To convert a hexadecimal string to an integer, use&lt;/p&gt;
&lt;p&gt;&lt;font color="blue"&gt;int&lt;/font&gt;.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier);&lt;/p&gt;
&lt;p&gt;In VB.NET, you can use the options above or VB-specific expressions. To convert an integer to a hexadecimal string, use&lt;/p&gt;
&lt;p&gt;Hex(i)&lt;/p&gt;
&lt;p&gt;To convert a hexadecimal string to an integer, use&lt;/p&gt;
&lt;p&gt;&lt;font color="blue"&gt;CInt&lt;/font&gt;(&lt;font color="fuchsia"&gt;"&amp;amp;H"&lt;/font&gt; &amp;amp; s)&lt;/p&gt;
&lt;p&gt;It also works with the other VB converters (e.g. &lt;font color="blue" face="Lucida Console" size="-1"&gt;CLng&lt;/font&gt; and &lt;font color="blue" face="Lucida Console" size="-1"&gt;CSng&lt;/font&gt;).&lt;/p&gt;&lt;img src="http://blogs.vertigosoftware.com/aggbug.aspx?PostID=635" width="1" height="1"&gt;</description></item><item><title>Outlook Command-line Switches</title><link>http://blogs.vertigosoftware.com/chris/archive/2004/10/05/628.aspx</link><pubDate>Tue, 05 Oct 2004 23:06:00 GMT</pubDate><guid isPermaLink="false">fcb82b5c-78c7-46a5-b6ff-1ef27e7d7271:628</guid><dc:creator>Chris</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.vertigosoftware.com/chris/comments/628.aspx</comments><wfw:commentRss>http://blogs.vertigosoftware.com/chris/commentrss.aspx?PostID=628</wfw:commentRss><description>Outlook supports several command-line switches you can use to restore
Outlook settings to their factory defaults, solve problems, or even
create new items. If you search Google for "Outlook command-line
switches" you'll receive several hits for many versions of Outlook.
Here are just a few.
&lt;p&gt;&lt;a href="http://www.petri.co.il/outlook_2003_command_line_switches.htm"&gt;MCSEworld&lt;/a&gt;&lt;br&gt;&lt;a href="http://www.outlook-tips.net/howto/commandlines.htm"&gt;Outlook Tips&lt;/a&gt;&lt;br&gt;&lt;a href="http://www.microsoft.com/exchange/techinfo/tips/outlookTip02.asp"&gt;Microsoft Exchange Server&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The definitive page is at &lt;a href="http://office.microsoft.com/en-us/assistance/HP010031101033.aspx"&gt;office.microsoft.com&lt;/a&gt;, of course.&lt;/p&gt;
&lt;p&gt;I think the most useful ones are those that reset some aspect of Outlook in case it decides to take a left turn into the weeds.&lt;/p&gt;
&lt;table cellpadding="3" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;/CleanClientRules&lt;/td&gt;
&lt;td&gt;Starts Outlook and deletes client-based rules. For non-Exchange users.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanFinders&lt;/td&gt;
&lt;td&gt;Sets Outlook 2003 Search Folders back to the default state (deletes custom Search Folders).&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanFreeBusy&lt;/td&gt;
&lt;td&gt;Cleans and regenerates free/busy information.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanProfile&lt;/td&gt;
&lt;td&gt;Removes invalid profile keys and recreates default Registry keys where applicable.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanPST&lt;/td&gt;
&lt;td&gt;Launches Outlook with a clean Personal Folders file (.pst).&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanReminders&lt;/td&gt;
&lt;td&gt;Cleans and regenerates reminders.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanRules&lt;/td&gt;
&lt;td&gt;Starts Outlook and deletes client- and server-based rules.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanSchedPlus&lt;/td&gt;
&lt;td&gt;Deletes all Schedule+ data (free/busy, permissions, and .cal file) from the server.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanServerRules&lt;/td&gt;
&lt;td&gt;Starts Outlook and deletes server-based rules. Used only with Exchange server accounts.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanSniff&lt;/td&gt;
&lt;td&gt;Deletes duplicate reminder messages.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/CleanViews&lt;/td&gt;
&lt;td&gt;Restores default views.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/FirstRun&lt;/td&gt;
&lt;td&gt;Starts Outlook as if it were run for the first time.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/ResetFolderNames&lt;/td&gt;
&lt;td&gt;Resets the language of the default folders to the language of the Outlook client.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/ResetFolders&lt;/td&gt;
&lt;td&gt;Restores missing folders for the default delivery location.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/ResetNavPane&lt;/td&gt;
&lt;td&gt;Clears and regenerates the Navigation Pane for the current profile.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/ResetOutlookBar&lt;/td&gt;
&lt;td&gt;Rebuilds the Outlook Bar.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/ResetWunderBar&lt;/td&gt;
&lt;td&gt;Rebuilds the new Outlook Control Bar in Outlook 2003.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/Sniff&lt;/td&gt;
&lt;td&gt;Starts Outlook and forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;I wonder what you can do with&lt;span&gt; /altvba &lt;em&gt;otmfilename&lt;/em&gt;&lt;/span&gt;?&lt;/p&gt;&lt;img src="http://blogs.vertigosoftware.com/aggbug.aspx?PostID=628" width="1" height="1"&gt;</description></item><item><title>SQL Cursors</title><link>http://blogs.vertigosoftware.com/chris/archive/2004/10/04/SQL_Cursors.aspx</link><pubDate>Mon, 04 Oct 2004 17:46:00 GMT</pubDate><guid isPermaLink="false">fcb82b5c-78c7-46a5-b6ff-1ef27e7d7271:627</guid><dc:creator>Chris</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.vertigosoftware.com/chris/comments/627.aspx</comments><wfw:commentRss>http://blogs.vertigosoftware.com/chris/commentrss.aspx?PostID=627</wfw:commentRss><description>Cursors allow you to loop through a result set in SQL. Use them
sparingly since they consume significant resources. Here is a stored
procedure that resets all of the clocks in your house (assuming you
keep your clocks in SQL).
&lt;p&gt;&lt;span&gt;CREATE PROCEDURE&lt;/span&gt; dbo.ResetAllClocks&lt;br&gt;&lt;span&gt;AS&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;SET NOCOUNT ON&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;DECLARE&lt;/span&gt; @ClockID &lt;span&gt;int&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;DECLARE&lt;/span&gt; ClockCursor &lt;span&gt;CURSOR &lt;strong&gt;FAST_FORWARD&lt;/strong&gt; FOR&lt;br&gt;SELECT&lt;/span&gt; ClockID &lt;span&gt;FROM&lt;/span&gt; Clocks&lt;br&gt;&lt;span&gt;&lt;br&gt;OPEN&lt;/span&gt; ClockCursor&lt;br&gt;&lt;br&gt;&lt;span&gt;FETCH NEXT FROM&lt;/span&gt; ClockCursor &lt;span&gt;INTO&lt;/span&gt; @ClockID&lt;br&gt;&lt;br&gt;&lt;span&gt;WHILE&lt;/span&gt; &lt;span&gt;@@FETCH_STATUS&lt;/span&gt; = &lt;span&gt;0&lt;/span&gt;&lt;br&gt;&lt;span&gt;BEGIN EXECUTE&lt;/span&gt; ResetOneClock @ClockID&lt;br&gt;&lt;br&gt;&lt;span&gt;FETCH NEXT FROM&lt;/span&gt; ClockCursor &lt;span&gt;INTO&lt;/span&gt; @ClockID&lt;br&gt;&lt;span&gt;END&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;CLOSE&lt;/span&gt; ClockCursor&lt;br&gt;&lt;span&gt;DEALLOCATE&lt;/span&gt; ClockCursor&lt;/p&gt;
&lt;p&gt;You may also specify several cursor options. For instance, the &lt;span&gt;FAST_FORWARD&lt;/span&gt;
keyword (in bold above) enables SQL Server to optimize the cursor since
it knows you only want a read-only, forward-only cursor. If you want to
move through the result set forwards and backwards, specify the &lt;span&gt;SCROLL&lt;/span&gt; keyword instead. If you want to add or remove rows to the tables involved in the cursor without affecting the cursor, use the &lt;span&gt;STATIC&lt;/span&gt;
keyword. There are several more keywords to control scope, locking, and
type checking. It's also possible to use a cursor to update the
underlying tables. See SQL Server Books Online and index &lt;span&gt;DECLARE CURSOR&lt;/span&gt; for more information.&lt;/p&gt;&lt;img src="http://blogs.vertigosoftware.com/aggbug.aspx?PostID=627" width="1" height="1"&gt;</description></item><item><title>Google Search Tips</title><link>http://blogs.vertigosoftware.com/chris/archive/2004/07/23/Google_Search_Tips.aspx</link><pubDate>Fri, 23 Jul 2004 19:01:00 GMT</pubDate><guid isPermaLink="false">fcb82b5c-78c7-46a5-b6ff-1ef27e7d7271:347</guid><dc:creator>Chris</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.vertigosoftware.com/chris/comments/347.aspx</comments><wfw:commentRss>http://blogs.vertigosoftware.com/chris/commentrss.aspx?PostID=347</wfw:commentRss><description>&lt;p&gt;Here are the Google search tips Isela sent a while ago. Now that
they're in the devblogs, you'll never lose them. You can always search
for these search tips.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use the Google Toolbar. It's available at &lt;a href="http://toolbar.google.com/"&gt;toolbar.google.com&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Use quotation marks to enclose strings that contain spaces so Google doesn't look for the words individually.&lt;/li&gt;
&lt;li&gt;Use the plus symbol (+) before a word to force Google to include a word in a search it normally excludes, such as common words.&lt;/li&gt;
&lt;li&gt;Use the minus symbol (-) before a word to return pages not containing that word.&lt;/li&gt;
&lt;li&gt;Use the tilde (~) before a word to search for synonyms of that word.&lt;/li&gt;
&lt;li&gt;Use the &lt;strong&gt;intitle&lt;/strong&gt; keyword before a word to force Google to search only in the titles of pages for that word.&lt;/li&gt;
&lt;li&gt;Use the &lt;strong&gt;intext&lt;/strong&gt; keyword before a word to force Google to ignore the titles of pages when searching for that word.&lt;/li&gt;
&lt;li&gt;Use the &lt;strong&gt;site&lt;/strong&gt; keyword followed by a domain to force Google to search only the site at that domain.&lt;/li&gt;
&lt;li&gt;Use Google's Preferences found at &lt;a href="http://www.google.com/preferences"&gt;www.google.com/preferences&lt;/a&gt;.&amp;nbsp;For
instance, you can restrict Google to return pages in a specific
language or tell Google you want results in a new window.&lt;/li&gt;
&lt;li&gt;Use Google Groups found on the Groups tab on their main page. This
will search news groups where people often ask questions to problems
and receive answers.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Here's an example that searches only &lt;a href="http://www.snpp.com/"&gt;www.snpp.com&lt;/a&gt;
(the Springfield Nuclear Power Plant, a Simpsons site) for Homer, but
not Marge, including the word “the” for anything to do with beer.&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;site:www.snpp.com Homer -Marge +the ~beer&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.vertigosoftware.com/aggbug.aspx?PostID=347" width="1" height="1"&gt;</description></item></channel></rss>