Click here to Skip to main content
15,881,751 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can we get Primary Interop Assemblies installed? Pin
Dave Kreskowiak9-Jul-09 4:23
mveDave Kreskowiak9-Jul-09 4:23 
QuestionQuerInterface fails for an Interface of type IUnknown in VB .NET windows service but the same works in VB .NET forms application Pin
VM JOE9-Jul-09 1:22
VM JOE9-Jul-09 1:22 
AnswerRe: QuerInterface fails for an Interface of type IUnknown in VB .NET windows service but the same works in VB .NET forms application Pin
Dave Kreskowiak9-Jul-09 4:22
mveDave Kreskowiak9-Jul-09 4:22 
QuestionRe: QuerInterface fails for an Interface of type IUnknown in VB .NET windows service but the same works in VB .NET forms application Pin
VM JOE9-Jul-09 8:30
VM JOE9-Jul-09 8:30 
AnswerRe: QuerInterface fails for an Interface of type IUnknown in VB .NET windows service but the same works in VB .NET forms application Pin
Dave Kreskowiak9-Jul-09 10:27
mveDave Kreskowiak9-Jul-09 10:27 
Questionhow can i connect crystal report to sqlserver with vb.net code ? Pin
xingselex9-Jul-09 0:44
xingselex9-Jul-09 0:44 
AnswerRe: how can i connect crystal report to sqlserver with vb.net code ? Pin
helelark1239-Jul-09 0:58
helelark1239-Jul-09 0:58 
AnswerRe: how can i connect crystal report to sqlserver with vb.net code ? Pin
Tom Deketelaere9-Jul-09 4:00
professionalTom Deketelaere9-Jul-09 4:00 
If you just want to update your connection settings (dbname / loginid / loginpass) this code will do:

Private Function reconnectreport(ByVal report As ReportDocument, ByVal servernaam As String, ByVal dbnaam As String, ByVal dbLogin As String, ByVal dbPass As String) As ReportDocument
        Try
            Dim connection As IConnectionInfo
            Dim oldServerName As String = report.DataSourceConnections(0).ServerName
            Dim newServerName As String = servernaam
            Dim oldDatabaseName As String = report.DataSourceConnections(0).DatabaseName
            Dim newDatabaseName As String = dbnaam
            Dim userID As String = dbLogin
            Dim password As String = dbPass
            report = report
            ' Change the server name and database in main reports
            For Each connection In report.DataSourceConnections
                If (String.Compare(connection.ServerName, oldServerName, True) = 0 _
                    And String.Compare(connection.DatabaseName, oldDatabaseName, True) = 0) Then
                    ' SetConnection can also be used to set new logon and new database table
                    report.DataSourceConnections(oldServerName, oldDatabaseName).SetConnection( _
                    newServerName, newDatabaseName, userID, password)
                End If
            Next
            ' Change the server name and database in subreports
            Dim subreport As ReportDocument
            For Each subreport In report.Subreports
                For Each connection In subreport.DataSourceConnections
                    If (String.Compare(connection.ServerName, oldServerName, True) = 0 _
                        And String.Compare(connection.DatabaseName, oldDatabaseName, True) = 0) Then
                        ' SetConnection can also be used to set new logon and new database table
                        subreport.DataSourceConnections(oldServerName, oldDatabaseName).SetConnection( _
                        newServerName, newDatabaseName, userID, password)
                    End If
                Next
            Next
            Return report
        Catch ex As Exception
            MessageBox.Show(ex.Message)
            Return Nothing
        End Try
    End Function

Questionvisual basic help Pin
Member 44064419-Jul-09 0:30
Member 44064419-Jul-09 0:30 
AnswerRe: visual basic help Pin
helelark1239-Jul-09 0:56
helelark1239-Jul-09 0:56 
AnswerRe: visual basic help Pin
Christian Graus9-Jul-09 2:18
protectorChristian Graus9-Jul-09 2:18 
GeneralRe: visual basic help Pin
Tom Deketelaere9-Jul-09 2:30
professionalTom Deketelaere9-Jul-09 2:30 
GeneralRe: visual basic help Pin
Christian Graus9-Jul-09 2:37
protectorChristian Graus9-Jul-09 2:37 
QuestionProblems regarding the code to send sms using .Net Pin
gjx_junxian19898-Jul-09 23:56
gjx_junxian19898-Jul-09 23:56 
AnswerRe: Problems regarding the code to send sms using .Net Pin
Dave Kreskowiak9-Jul-09 4:06
mveDave Kreskowiak9-Jul-09 4:06 
GeneralRe: Problems regarding the code to send sms using .Net Pin
gjx_junxian19899-Jul-09 4:27
gjx_junxian19899-Jul-09 4:27 
GeneralRe: Problems regarding the code to send sms using .Net Pin
Dave Kreskowiak9-Jul-09 7:36
mveDave Kreskowiak9-Jul-09 7:36 
QuestionDLLs required to use GetObject() method in VB.Net Pin
Raheem MA8-Jul-09 19:59
Raheem MA8-Jul-09 19:59 
AnswerRe: DLLs required to use GetObject() method in VB.Net Pin
tosch8-Jul-09 20:11
tosch8-Jul-09 20:11 
GeneralRe: DLLs required to use GetObject() method in VB.Net Pin
Raheem MA8-Jul-09 20:40
Raheem MA8-Jul-09 20:40 
GeneralRe: DLLs required to use GetObject() method in VB.Net Pin
helelark1238-Jul-09 20:42
helelark1238-Jul-09 20:42 
GeneralRe: DLLs required to use GetObject() method in VB.Net Pin
Raheem MA8-Jul-09 22:14
Raheem MA8-Jul-09 22:14 
GeneralRe: DLLs required to use GetObject() method in VB.Net Pin
helelark1238-Jul-09 22:24
helelark1238-Jul-09 22:24 
GeneralRe: DLLs required to use GetObject() method in VB.Net Pin
Raheem MA9-Jul-09 0:04
Raheem MA9-Jul-09 0:04 
GeneralRe: DLLs required to use GetObject() method in VB.Net Pin
helelark1239-Jul-09 0:17
helelark1239-Jul-09 0:17 

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.