
Wednesday, November 16, 2011
New Look coming to Experts Exchange

Wednesday, October 12, 2011
General Failure clicking on URL in Outlook when using Firefox
However, with the upgrade to Outlook 2010 and more importantly Firefox 7.0.1 I get the message but the URL will not open, leaving me with a great big frowny face and no webpage to browse.
Here is an example of what I would get if I tried to open a link in an email from one of my favorite emails, Think Geek:
If this were the end of the story, I would not be posting this. If you too have a frowny face from frustration, simply follow the steps below to not only get the webpage to open, but to also get rid of the message all together.
- Close Firefox and Outlook (make sure they are completely closed, i.e. downloads window, popups, etc)
- Open Regedit by clicking on Start -> Run -> Regedit
- In Vista or Windows 7 you can click Start and type in Regedit in the search area. Make sure you right click and open "As Administrator"
- ***WARNING*** Changing keys in the registry can mess up your system. Please make sure you are comfortable using regedit and follow the steps EXACTLY!!
- Back up your registry by going to File -> Export
- You can back up the whole registry, or browse to the key we are going to change and just back it up. Either way, make sure you have a backup in case you need to revert back.
- Browse to HKEY_Classes_Root\FirefoxURL\Shell\Open\ddeexec
- You should see a key named Default with a value data of "%1",,0,0,,,,
- Double click it to edit the value data
- Clear the value data so that it is blank
- Click OK
- Close Regedit
- Open Outlook and now when you click on an embedded URL not only will you not see the message, but FF will open automatically.
Saturday, April 9, 2011
Setting up SQL 2005 with and External IP
***WARNING***
This will open up ports in your firewall. You will want to take precautionary steps to be sure that you are not making your network and/or server vulnerable to attack. I will show you a few ways you can protect yourself when using this method.
There are several steps and/or checks to make sure are set.
Here's how to do it:

Open SQL Server Management Studio. Right click on the server and select Properties. This will show you the IP your SQL Server is using.

Open SQL Server Configuration Manager. Expand the SQL Server 2005 Network Configuration menu and highlight the "Protocols for MSSQLSERVER". Make sure that TCP/IP is enabled.

Right click on the "TCP/IP" and select Properties.

You should see 3 different entries: IP1, IP2, and IPAll. Usually IP1 will be your external IP, IP2 will be your internal IP.
You can specify the external IP here. I have chosen the IP 198.113.113.113 (not a real IP) I will use the IP in later steps.
You can also specify the port that will be used. I will use the default port of 1433 for this example.
*TIP: Use a custom port to help with security.

Next, open the Surface Area Configuration and click on MSSQLSERVER, expand the Database Engine, and click on Remote Connections. Make sure that the "Local and remote connections" option is selected. In the submenu, you can select either "Using TCP/IP only" or "Using both TCP/IP and named pipes"

Open the Services by going to Start-> All Programs -> Administrative Tools -> Services
Make sure that SQL Server and SQL Browser services are started and are set to start automatically.

Now I need to configure my firewall to allow the connection. I am using a Netgear FVX358.
Click on "Security" and then on "Services"
I will add a service and name it "Real Data Plus". I will make it a TCP type and since I only want to open one port, I will make the "Starting Port" and "Ending Port" the same, the default 1433.


Now, I navigate to the "Firewall" menu, still under the "Security" settings.
Click on the "LAN WAN Rules" tab. Under the "Outbound policy" add a new entry. Be sure to name it the same as the Rule in the above step, in my case "Real Data Plus". Enter the internal address you want the traffic to be redirected to and the external ip the traffic will be coming from.
*TIP: For added security, specify the IP address or range that the traffic will be coming from. The firewall will block all others.

To test to make sure a connection can be made through the external IP open a command prompt and type the following command without the quotes: "sqlcmd -S 198.113.113.113,1433 -U sa" (Of course, use your own IP and port number) You will prompted for a password. Once you enter it, if you get the 1> prompt, you have successfully been connected. Type "EXIT". If you do not get this prompt, you are not able to be connected so something is not opened properly.

To test the port forwarding through the firewall, I used the website http://yougetsignal.com/tools/open-ports I entered the external address of 198.113.113.113 and the port 1433 and it came back to tell me that my port is opened or closed. This is useful, as then you know if it is a SQL problem or a firewall problem.
Tuesday, January 4, 2011
How to use Terminal Server Licenses after a server crash





Reusing Terminal Server Licenses on a new server
Sunday, January 17, 2010
Searching SQL Database for Keyword
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%KEYWORD%'
AND ROUTINE_TYPE='PROCEDURE'
ORDER BY ROUTINE_NAME
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%KEYWORD%'
AND ROUTINE_TYPE='FUNCTION'
ORDER BY ROUTINE_NAME
SELECT NAME
FROM sysobjects
WHERE id IN ( SELECT id FROM syscolumns WHERE NAME like '%KEYWORD%' )
Friday, February 8, 2008
Creating a system DSN entry with VB.Net 2005
First of all, many thanks to Paul Clement whose post was able to get my last bug out and the code working correctly. (See his post at http://www.mcse.ms/message1068199.html)
Here is my code:
Private Declare Function SQLConfigDataSource Lib "ODBCCP32.DLL" (ByVal hwndParent As Integer, ByVal ByValfRequest As Integer, ByVal lpszDriver As String, ByVal lpszAttributes As String) As Integer
Private Const ODBC_ADD_SYS_DSN As Short = 4
Private Const vbAPINull As Int32 = 0
Public Function CreateODBC(ByVal szDSNName As String, ByVal szServerName As String, ByVal szDatabase As String) As Boolean
Dim szAttributes As String = ""
Dim szDriver As String = "SQL Server" '//Set to SQL Server as it is the most common
Dim lReturnValue As Int32 = 0
Try
szAttributes = szAttributes & "Server=" & szServerName & Chr(0)
szAttributes = szAttributes & "DESCRIPTION=Test" & Chr(0)
szAttributes = szAttributes & "DSN=" & szDSNName & Chr(0)
szAttributes = szAttributes & "Database=" & szDatabase & Chr(0)
szAttributes = szAttributes & "Trusted_connection=YES" & Chr(0)
'//To show dialog, use Form1.Hwnd instead of vbAPINull
lReturnValue = SQLConfigDataSource(vbAPINull, ODBC_ADD_SYS_DSN, szDriver, szAttributes)
If lReturnValue <> 0 Then
Return True
Else
Return False
End If
Catch ex As Exception
RptError("Unable to create the ODBC", ex)
Return False
End Try
End Function
Tuesday, February 5, 2008
Simple Progress Bar vb.net Code
I have a form with a progress bar on it called progBar1, a button called btnUpgrade, and a backgroundworker called bwBackgroundWorker.
Private Sub btnUpgrade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpgrade.Click
Try
'//Disable the upgrade button
Me.btnUpgrade.Enabled = False
'//Create a new instance and initialize
bwBackgroundWorker = New System.ComponentModel.BackgroundWorker
bwBackgroundWorker.WorkerReportsProgress = True
bwBackgroundWorker.WorkerSupportsCancellation = True
bwBackgroundWorker.RunWorkerAsync()
Catch ex As Exception
RptError("Unable to upgrade!", ex)
End Try
End Sub
Private Sub bwBackgroundWorker_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles bwBackgroundWorker.DoWork
'//Just for a test, create a loop
For X As Int32 = 0 To 100
If bwBackgroundWorker.CancellationPending Then
Exit For
End If
bwBackgroundWorker.ReportProgress(X)
Threading.Thread.Sleep(100)
Next
End Sub
'//Update the progress bar
Private Sub bwBackgroundWorker_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles bwBackgroundWorker.ProgressChanged
Me.progBar1.Value = e.ProgressPercentage
End Sub