Question : Trouble with WIN7 XP Mode and Printing

I have XP mode setup on a WIN7 professional machine. My understanding was, my printers which are installed on my WIN7 professional installation would be available to apps I installed in XP mode. I find out this is not the case. Integration features are enabled and I can see my shared drives but not my printers. Do I have to manually install the printers again in XPmode?

Answer : Trouble with WIN7 XP Mode and Printing

You need to change your code as below.

You need to put Dim t As New TechnologySet in Loop instead of outside.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
Public Shared Function GetTechnologyData() As List(Of TechnologySet)
        Dim techlist As New List(Of TechnologySet)
        Dim CnSql As SqlConnection = BadsDB.GetConnection
        Dim cmdA As SqlCommand
        cmdA = New SqlClient.SqlCommand("up_CompareTechnology", CnSql)
        cmdA.CommandType = CommandType.StoredProcedure
        Try
            CnSql.Open()
            Dim reader As SqlDataReader = cmdA.ExecuteReader(CommandBehavior.CloseConnection)
            
            Dim x As Integer = 1
            Do While reader.Read
		Dim t As New TechnologySet
                t.TechnologySetCode = reader("TechnologySetCode").ToString
                t.TechnologySetName = reader("TechnologySetName").ToString
                t.TechnologySetType = reader("TechnologySetType").ToString
                t.Notes = reader("Notes").ToString
                techlist.Add(t)
            Loop
            Return techlist

        Catch excA As SqlException
            MsgBox(excA.Message)
            Return Nothing
        Finally
            CnSql.Close()
        End Try
Random Solutions  
 
programming4us programming4us