Posts

Capturing the file name and line number of an Exception

Handling exceptions is a critical task in any application.  When an exception is logged, it needs to have sufficient detail so it can be researched at a later time.  In addition, as a developer, you want to extract and log as much detail about it as possible.  Some of those details include the file name and line number where the exception occurred.  Listed below is a method that handles exceptions, extracts the message, file name, and line number for logging.             private void ProcessEx(Exception ex, string details = "")         {             int lineNumber = 0;             const string lineNumberMarker = ":line ";             string traceText = ex.StackTrace + "";  /...

Changing DB Password in Oracle SQL Developer

Image
While working with Oracle SQL Developer , you may encounter the following message when the password is near expiration.   5   A database warning was encountered performing the requested operation:   ORA-28002: the password will expire within 5 days 28002. 00000 -  "the password will expire within %s days" *Cause:    The user's account is about to expire and the password            needs to be changed *Action:   change the password or contact the DBA Vendor code 28002     To change the password: Open the Connections tab (View > Connections) Right click the database where the password needs to be changed Select “Reset Password…”     A pop-up form (see below) will appear prompting for the old and new passwords.     That’s it.  Seems simple but if you’re not familiar ...

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Image
Overview : I have a Windows Form application, built in .Net 4.7.2 using Visual Studio 2019.  The form has 3 PartID combo boxes, allowing the user to select 3 distinct part IDs from a finite list of parts in the drop down.     Problem : When the combo box was being filled with values in the drop down list, the following exception was thrown.   Exception : System.AccessViolationException   HResult=0x80004003   Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.   Source=<Cannot evaluate the exception source>   StackTrace: <Cannot evaluate the exception stack trace>   Code :         private void cbPO_LostFocus(object sender, EventArgs e)         {             FillPartID1(poLines);      ...

ComboBox selection changes selection in other comboBox controls

Image
Overview : I have a Windows Form application, built in .Net 4.7.2 using Visual Studio 2019.  The form has 3 PartID combo boxes, allowing the user to select 3 distinct part IDs from a finite list of parts in the drop down.     Problem : Once the user selects a PartID in any combo box, the other 2 combo boxes are automatically set to that value.             private void Start()         {             DataTable POLines = GetLineNumsByPO(PO);               FillPartID1(POLines);             FillPartID2(POLines);             FillPartID3(POLines);                  ...

Sep' 20 .Net Events

Virtual User Group Meetings Sep 1: ONSQL-Cleveland “SQL Azure Deployment Options” https://ohionorth.pass.org/   Sep 10: .Net Virtual User Group “Adding a little DAPR to .NET Microservices” https://www.meetup.com/dotnet-virtual-user-group/events/272490405/   Sep 16: Hudson Software Craftsmanship “Crafting Better Software” https ://www.meetup.com/Hudson-Software-Craftsmanship-Meetup /   Sep 24: Cleveland C#/VB.Net User Group https ://www.meetup.com/Cleveland-C-VB-Net-User-Group /     Virtual Conferences Aug 28: .NET Dev Summit 2020 (Bengaluru): https://bdotnet.in/dotnet-dev-summit-2020/   Aug 29: SQL Saturday (Salt Lake City, UT): https://www.sqlsaturday.com/997/  

.Net Virtual Events - Aug 2020

Like Technical Events?  Me too!  Here’s a list of .Net related events online and free of charge. Aug 11: “Come meet the new .NET Standard MVVM” - https://www.meetup.com/dotnet-virtual-user-group/events/272490308 Aug 12-14: Pittsburgh Tech Fest - http://www.pghtechfest.com/ Aug 13: “Migrate Your Apps and SQL Server Databases to Azure” - https://info.microsoft.com/ww-landing-azure-webinar-series-migrate-your-apps-and-sql-server-databases-to-azure.html?lcid=en-us&ocid=mkto_eml_EM666897A1LA1&ocid=eml_pg189324_gdc_comm_az Aug 13: “Breaking Bad Habits: Solutions for Common Query Antipatterns” - https://www.meetup.com/Louisville-Data-Technology-Group/events/270966985/ Aug 13-14: JavaScript & Friends Conference - https://www.javascriptandfriends.com/   Aug 19: Hudson Software Craftsmanship - https://www.meetup.com/Hudson-Software-Craftsmanship-Meetup/ Aug 27: “Dialogue with your Data...

Global 2020 Summer AI/ML Fest

The Global 2020 Summer AI/ML Fest is a virtual event with 8 tracks (3 Developer, 3 Business, 2 ML).  The event took place on Friday, July 31, 2020.  If you missed this free event or want to revisit some of the sessions, the links below provide access to all content:   Full listing of all sessions: https://aka.ms/summer2020-globalaimlfest.com   Presentation Slides: https://aka.ms/downloads-global2020summeraimlfest   Recorded Sessions:  https://aka.ms/azurecloudevents    

Jul/Aug Tech Events

Local Events Aug 4: ONSQL-Cleveland ( https://ohionorth.pass.org / ) ??? Aug 19: Hudson Software Craftsmanship ( https://www.meetup.com/Hudson-Software-Craftsmanship-Meetup/ ) Aug 27: Cleveland C#/VB.Net User Group ( https://www.meetup.com/Cleveland-C-VB-Net-User-Group/ )   Regional/Virtual Events Jul 25: SQL Saturday (Albany, NY): https://www.sqlsaturday.com/961/EventHome. aspx Jul 25-26: PyOhio https://ti.to/pyohio/pyohio-2020 Jul 30: .Net Conf https://focus.dotnetconf.net/ Aug 13-14: https://www.javascriptandfriends.com/  

KeyCode vs. KeyData vs. KeyValue

When trying to examine user keystrokes in Windows Forms, the .Net Framework and .Net Core offer a variety of properties:   Keys: an enumeration in the System.Windows.Forms namespace that Specifies key codes and modifiers.   KeyCode: returns the System.Windows.Forms.Keys value that is the key code for the event.   KeyData: Returns the System.Windows.Forms.Keys representing the key code for the key that was pressed, combined with modifier flags that indicate which combination of CTRL, SHIFT, and ALT keys was pressed at the same time.   KeyValue: returns the integer representation of the KeyCode property.     Example: tbUnitPrice.PreviewKeyDown += new PreviewKeyDownEventHandler(this.tbUnitPrice_PreviewKeyDown);  //Add event handler to capture keystroke             private void tbUnitPrice_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)     ...

June/July Tech Events

Local Events Jul 7: ONSQL-Cleveland ( https://ohionorth.pass.org/ ) Jul 15: Hudson Software Craftsmanship ( https://www.meetup.com/Hudson-Software-Craftsmanship-Meetup/ ) Jul 23: Cleveland C#/VB.Net User Group ( https://www.meetup.com/Cleveland-C-VB-Net-User-Group/ )   Regional (Virtual) Events Jun 26: C# Corner WIT https://www.c-sharpcorner.com/events/women-in-tech-virtual-conference Jun 27: SQL Saturday (Chattanooga, TN): https://www.sqlsaturday.com/960/EventHome.aspx Jul 25: SQL Saturday (Albany, NY): https://www.sqlsaturday.com/961/EventHome.aspx  

BlazorDay is June 18, 2020

BlazorDay is almost here. Starting Thursday, June 18 , at 8:00 AM Pacific Time or 5:00 PM Paris Time. Don't miss the keynote with Daniel Roth, the Blazor Program Manager at Microsoft. Daniel will be followed by 8 greats experts of the Blazor world. 1. What is the session planning? The full planning is available on https://www.blazorday.net/planning . 2. How to see the live show? Go to https://BlazorDay.net/live or directly to Youtube on https://youtu.be/XoizucRjxgU . The same stream is also available on Facebook and on Twitch . 3. How to submit your questions? Use the Youtube chat (or Facebook or Twitch chats) to submit your questions to the speakers. We will relay these questions at the end of the presentation. 4. How to replay the show? After the live, the video will be available on https://devapps.ms or https://BlazorDay.net/live .  

Resume Building Workshop

The professional recruiters at TekSystems are hosting a Resume Building Workshop on May 20, 2020, Noon-1 PM EST.  This will be a virtual meeting and accessible by anyone from anywhere.    ·         Come learn more about resume building best practices ·         How to make your resume stand out ·         How to break down tips by skillset and targeted roles ·         Learn statistics about the IT job market ·         Get answers to questions from people who know hiring trends in the IT industry.   You may not need to send out your resume now, but you will eventually.  Better be prepared when the time comes!   Please register at https://www.eventbrite.com/e/virtual-it-resume-building-workshop-hosted-by-teksystems-free-ev...

May 2020 Virtual Events

Despite the COVID-19 epidemic, technical events are still taking place.  Listed below are virtual events scheduled for this month.  Although these events are free, registration is required.  May 7-8: Join the first ever SQL Server 2019 Virtual Symposium. Two days of training. Yeah, it’s free. https://bit.ly/sql_2019_vs_may2020 May 9: CouchCon Live: http://couchconlive.org/ May 12-13: https://groupby.org/: You can also view prior GroupBy sessions on YouTube: https://www.youtube.com/c/GroupbyOrg May 16: SQL Saturday Cincinnati-Virtual: https://www.sqlsaturday.com/948/EventHome.aspx May 28: Cleveland C#/VB.Net User Group: "Giving Sight To Applications" By Sam Nasr(NIS  Technologies): https://www.meetup.com/Cleveland-C-VB-Net-User-Group/events/270382986 May 30: SQL Saturday Brisbane-Virtual: https://www.sqlsaturday.com/986/EventHome.aspx Please don’t forget to sign up and join.