Categories
Microsoft Visual Studio Windows 7 Windows Server 2008 Windows Vista

Microsoft Visual Studio 2005 Service Pack 1 installation fails on Microsoft Windows 7

When you try to install the Microsoft Visual Studio 2005 Service Pack 1 on Microsoft Windows 7 appears the following error message:

The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.

in Italian:

Impossibile installare la patch di aggiornamento perché il programma da aggiornare manca oppure la patch è progettata per aggiornare una versione differente di tale programma. Assicurarsi che il programma da aggiornare sia disponibile nel computer in uso e che la versione della patch di aggiornamento sia corretta.

Solution:

Download and install SP1 from the following link:
Microsoft® Visual Studio® 2005 Team Suite Service Pack 1

Update:

After you can install the following update:
Visual Studio 2005 Service Pack 1 Update for Windows Vista (This update also applies to Windows 7, Windows Server 2008, and Windows Server 2008 R2)

Did my solution solve your problem? Leave a reply.

Categories
HOW TO Microsoft SQL Server VB.NET Visual Studio

HOW TO read text from data type Image of Microsoft SQL Server [VB.NET]

The data type image of Microsoft SQL Server is used to store
Variable-length binary data from 0 through 2^31-1 (2,147,483,647) bytes.

The following sample code show how to read text from data type Image using VB.NET:

[sourcecode language=”vb”]
Dim query As String = "SELECT [Image Column] FROM MyTable"
Dim conn As New SqlConnection(connString)
Dim cmd As New SqlCommand(query, conn)

conn.Open()
Dim rdr As SqlDataReader = cmd.ExecuteReader(CommandBehavior.SingleRow)

Try
If rdr.Read() Then
Dim i As Integer = rdr.GetOrdinal("Image Column")
If Not rdr.IsDBNull(i) Then
Dim bufferSize = rdr.GetBytes(i, 0, Nothing, 0, Integer.MaxValue) – 1
Dim outbyte(bufferSize) As Byte
rdr.GetBytes(i, 0, outbyte, 0, bufferSize)
Dim enc As New System.Text.ASCIIEncoding
MyTextBox.Text = enc.GetString(outbyte, 0, bufferSize)
End If
End If
Finally
‘ Always call Close when done reading

rdr.Close()

‘ Always call Close when done reading

conn.Close()
End Try
[/sourcecode]

Did my HOW TO help you?