I am trying to develop a subroutine that will send an IM to a user. The idea being if the user is online, the code sends an IM to the user via communicator. If the user is offline, it sends an email.

The code does work, in that it does open the communicator window, but it does not send the message text.

I am testing this off a button atm, but the code sample I found used Communicator 2007 -- there is no SendText() method in Communicator 2005. I have been unable to find a solution online, so I am hoping someone here will have a suggestion.
Private Sub Command0_Click()
Dim msgr As CommunicatorAPI.IMessengerConversationWndAdvanced

Dim strTo As String
Dim strMsg As String

strTo = "email@test.com"
strMsg = "Test from VBA"

On Error Resume Next
Set msgr = Messenger.InstantMessage(strTo)
'msgr.SendText(strMsg) 'Only for Communicator 2007

End Sub

Ok, turns out there was a shapecontainer and a line that required the powerpack dll. I removed the items and the reference for the powerpack.

Everything runs great now.


Watched both the task manager and the eventlog and nothing.

I will code a simple "hello world" project and see if that will work.

I will post the results.

Tried your suggestion. Great advice for debugging, however, when the project was run on the other system, it did install, but does not even show the splash screen I added. Since it doesn't even load the splash screen, it does not even reach the StreamWriter code I added.

Any other thoughts?

Being new to VB.NET, This may not be the cleanest way to do this, but it works for me.

I have a form that populates a combo box with the dates of employee reports, and then fills another combo box with a list of employee names on the report when the date is selected/changed.

Here is the code I am using to populate the first combo box:
Dim cnnSQL As New System.Data.SqlClient.SqlConnection(My.Settings.ConnectionString)
Dim strSQL As String = "SELECT row_number()over (order by ReportDate DESC) as ID, ReportDate FROM uvw_ReportDate GROUP BY ReportDate UNION SELECT 0, 'Select Report Date' "
Dim da As New System.Data.SqlClient.SqlDataAdapter(strSQL, cnnSQL)
Dim ds As New DataSet
da.Fill(ds, "uvw_ReportDate")

    'Populates the report selection combobox
    With Me.ComboBox17
        .DataSource = ds.Tables("uvw_ReportDate")
        .DisplayMember = "ReportDate"
        .ValueMember = "ReportDate"
        .SelectedIndex = 0
    End With


When the date is selected, I use the ComboBox17_SelectedIndexChanged to handle the change and fill the employee list with this code:

Dim cnnSQL As New System.Data.SqlClient.SqlConnection(My.Settings.ConnectionString)

        'Populate the Employee Name combo box
        Dim strSQL As String = "SELECT row_number()over (order by EmplyeeName ASC) as ID, EmplyeeName FROM tblManning WHERE CONVERT(varchar,[Rpt Date],101) = '" & Me.ComboBox17.Text & "' GROUP BY EmplyeeName, [Rpt Date] UNION ALL SELECT 0, 'Select Employee' AS EmplyeeName ORDER BY ID ASC"
        Dim da As New System.Data.SqlClient.SqlDataAdapter(strSQL, cnnSQL)
        Dim ds As New DataSet
        da.Fill(ds, "tblManning")

        With Me.ComboBox24
            .DataSource = ds.Tables("tblManning")
            .DisplayMember = "EmplyeeName"
            .ValueMember = "ID"
            .SelectedIndex = 0
        End With


The Union statement adds a "select blah" to the combo box ...

The last line of your stored procedure is actually returning your SQL statement, not your count..

You need to define and output variable in your stored procedure.

I found this page a big help: [URL="http://www.sqlteam.com/article/stored-procedures-returning-data"]http://www.sqlteam.com/article/stored-procedures-returning-data[/URL]

About 2/3 of the way down it also shows how to get the parameter back and put the value into a ASP page. A few minor changes and it will work in .NET.

Hope this helps.

I am very new to VB.NET. That said, I have developed a windows form that utilizes an SQL Server back end.

I am developing using Visual Studio 2008 and the 3.5 Framework. The SQL server is 2005.

I do not have any warnings or errors, and the project compiles without error. When I run the install package on another computer, everything appears to install correctly, and the shortcut is placed on the desktop. However, when opened, the cursor goes into wait mode for a few seconds then returns to normal and the form does not open.

I am using windows authentication for the SQL server, and the user of the other computer is the owner of the database I am developing for, so that person has access. I am using the following when making a connection to the SQL server:
[code]Dim cnnSQL As New System.Data.SqlClient.SqlConnection(My.Settings.ConnectionString)[/code]

The settings for the Connection String are:
[code]Data Source=xxx.xxx.xxx.xxx;Initial Catalog=Project1;Integrated Security=True; Timeout = 60[/code]

I receive no errors and have no clue as to why it will not run. I have verified that the other system has the 3.5 SP1 framework installed.

Any advice/assistnace to get this application deployable would be great.