Click here to Skip to main content
15,887,311 members
Home / Discussions / Database
   

Database

 
GeneralRe: Linked Server performance Pin
PIEBALDconsult29-Oct-08 5:52
mvePIEBALDconsult29-Oct-08 5:52 
QuestionSQLServer and Lotus Notes Pin
Tim Carmichael23-Oct-08 6:28
Tim Carmichael23-Oct-08 6:28 
AnswerRe: SQLServer and Lotus Notes Pin
Mycroft Holmes23-Oct-08 11:59
professionalMycroft Holmes23-Oct-08 11:59 
QuestionSSIS package when executed as Job not printing even the job executes successfully! Pin
SIJUTHOMASP23-Oct-08 5:56
professionalSIJUTHOMASP23-Oct-08 5:56 
AnswerRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
Wendelius23-Oct-08 8:28
mentorWendelius23-Oct-08 8:28 
QuestionRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
SIJUTHOMASP23-Oct-08 8:50
professionalSIJUTHOMASP23-Oct-08 8:50 
AnswerRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
Wendelius23-Oct-08 8:59
mentorWendelius23-Oct-08 8:59 
QuestionRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
SIJUTHOMASP23-Oct-08 10:29
professionalSIJUTHOMASP23-Oct-08 10:29 
Here is the code used in the SSIS to print. Procedures used to retrive the printer name. The thing is that , it is updating the log file as doc send to the printer.. for eg: doc1 send to the printer \\nw path\printer name. One more differenc I noticed is that, in that 32 bit machine where it is printing fine having IIS installed but the 64 bit machine not having IIS installed..Will this affect when print using a job ?

PrintStatus("PrintStatus").Value = 3
flgFindPrinter = False
AttemptCount = -1

While (Not flgFindPrinter And AttemptCount < MaxRetryAttempts("MaxRetryAttempts").Value)
    Dim prnDoc As New System.Drawing.Printing.PrintDocument
    For Each prn As String In prnDoc.PrinterSettings.InstalledPrinters
        If prn.ToLower = PrinterName("PrinterName").Value.ToString.ToLower Then
            flgFindPrinter = True
        End If
    Next

    PrintStartTime("PrintStartTime").Value = Date.Now

    If flgFindPrinter Then
        defaultPrinter = prnDoc.PrinterSettings.PrinterName

        Dim wsNetwork As Object
        Try
            wsNetwork = CreateObject("WScript.Network")
            wsNetwork.SetDefaultPrinter(PrinterName("PrinterName").Value)

            Dim IE As Object = CreateObject("InternetExplorer.Application")
            IE.navigate(FolderPath("AbsoluteFolderPath").Value & DocName("DocName").Value)

            While (IE.QueryStatusWB(6) <> 3)
                Threading.Thread.Sleep(500)
            End While

            IE.ExecWB(6, 2, Nothing, Nothing)

            Dts.Events.FireInformation(1000, "Print Document", FolderPath("AbsoluteFolderPath").Value & DocName("DocName").Value & " Successfully Printed to " & PrinterName("PrinterName").Value, "", 0, False)
        Catch ex As Exception
            Dts.Events.FireInformation(2000, "Print Document", ex.Message, "", 0, False)
            PrintStatus("PrintStatus").Value = 2
        Finally
            If wsNetwork IsNot Nothing Then wsNetwork.SetDefaultPrinter(defaultPrinter)
        End Try

    Else
        Dts.Events.FireInformation(2000, "Print Document", PrinterName("PrinterName").Value & " Not Found", "", 0, False)
        PrintStatus("PrintStatus").Value = 2
    End If
    AttemptCount += 1
End While

Dim strLog As String
If flgFindPrinter Then
    strLog = FolderPath("AbsoluteFolderPath").Value & DocName("DocName").Value & " Successfully Printed to " & PrinterName("PrinterName").Value
Else
    strLog = FolderPath("AbsoluteFolderPath").Value & DocName("DocName").Value & " Failed to Print on " & PrinterName("PrinterName").Value
End If
If AttemptCount <> 0 Then
    strLog &= " With Retry Attempts " & AttemptCount
End If

LogDescription("LogDescription").Value = strLog
RetryAttempts("RetryAttempts").Value = AttemptCount

Dts.TaskResult = Dts.Results.Success


SoftwareDeveloper(.NET)

AnswerRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
SIJUTHOMASP24-Oct-08 7:01
professionalSIJUTHOMASP24-Oct-08 7:01 
GeneralRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
Wendelius24-Oct-08 7:32
mentorWendelius24-Oct-08 7:32 
GeneralRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
SIJUTHOMASP24-Oct-08 7:57
professionalSIJUTHOMASP24-Oct-08 7:57 
GeneralRe: SSIS package when executed as Job not printing even the job executes successfully! Pin
Wendelius24-Oct-08 8:01
mentorWendelius24-Oct-08 8:01 
QuestionIndex vs Param Pin
E_Gold23-Oct-08 5:55
E_Gold23-Oct-08 5:55 
AnswerRe: Index vs Param Pin
David Mujica23-Oct-08 6:31
David Mujica23-Oct-08 6:31 
GeneralRe: Index vs Param Pin
E_Gold23-Oct-08 10:03
E_Gold23-Oct-08 10:03 
GeneralBarcode sounds like primary key Pin
David Mujica23-Oct-08 11:07
David Mujica23-Oct-08 11:07 
GeneralRe: Barcode sounds like primary key Pin
E_Gold23-Oct-08 12:19
E_Gold23-Oct-08 12:19 
GeneralRe: Barcode sounds like primary key Pin
David Mujica24-Oct-08 7:29
David Mujica24-Oct-08 7:29 
AnswerRe: Index vs Param Pin
Wendelius23-Oct-08 8:05
mentorWendelius23-Oct-08 8:05 
Question2 Databases 2 locations one website??? Pin
GDMFSOB23-Oct-08 3:59
GDMFSOB23-Oct-08 3:59 
AnswerSQL 2005 is the way to go Pin
David Mujica23-Oct-08 4:47
David Mujica23-Oct-08 4:47 
AnswerRe: 2 Databases 2 locations one website??? Pin
Wendelius23-Oct-08 8:22
mentorWendelius23-Oct-08 8:22 
GeneralRe: 2 Databases 2 locations one website??? Pin
nelsonpaixao23-Oct-08 15:42
nelsonpaixao23-Oct-08 15:42 
QuestionExperience with CLR Stored Procedures in MS SQL Server 2005 Pin
James R. Twine23-Oct-08 2:34
James R. Twine23-Oct-08 2:34 
QuestionRe: Experience with CLR Stored Procedures in MS SQL Server 2005 Pin
led mike23-Oct-08 4:39
led mike23-Oct-08 4:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.