Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
objMessageDB = New XMessageDB
       objConstants = New XConstants
       objMessageDB.Open()
       output.InnerHtml += "Open: ERROR #" & objMessageDB.LastError & _
                           " (" & objMessageDB.GetErrorDescription(objMessageDB.LastError) & ")"
       output.InnerHtml += "<BR><BR>"
       If (objMessageDB.LastError = 0) Then
           objMessage = objMessageDB.Create()
           output.InnerHtml += "Create: ERROR #" & objMessageDB.LastError & _
                               " (" & objMessageDB.GetErrorDescription(objMessageDB.LastError) & ")"
           output.InnerHtml += "<BR><BR>" & vbCrLf
           If (objMessageDB.LastError = 0) Then
               output.InnerHtml += "Message Created with ID: " & objMessage.ID
               output.InnerHtml += "<BR><BR>" & vbCrLf
               objMessage.Direction = objConstants.MESSAGEDIRECTION_OUT
               objMessage.Recipient = "+31647134225"
               objMessage.Status = objConstants.MESSAGESTATUS_PENDING
               objMessage.Type = objConstants.MESSAGETYPE_SMS
               objMessage.Body = "Message Created with ASP.NET(VB)"
               objMessageDB.Save(objMessage)
               output.InnerHtml += "Save: ERROR #" & objMessageDB.LastError & _
                                   " (" & objMessageDB.GetErrorDescription(objMessageDB.LastError) & ")"
               output.InnerHtml += "<BR><BR>" & vbCrLf
           End If




Iam getting error at "Output"---- 'that output is not declared' in this code please any one help me..........


tnx
harsha
Posted

Have you declared output somewhere in this code.
You need to create a variable with the name output and type XDocument(I think - not sure here).
 
Share this answer
 
Comments
Sandeep Mewara 2-Apr-11 3:32am    
OP has posted code and some comment your answer as an answer. Please have a look.
Abhinav S 2-Apr-11 4:25am    
Thanks.
Thnx for reply abhinav,

I haven't declared "Output" anywhere in the program and i even tried to declare as "XDocument" as you said.That too didn't worked.

Look at the complete code once....


XML
Imports AXMMCFGLib
Partial Class _Default
    Inherits System.Web.UI.Page
    Protected objMessageDB As XMessageDB
    Protected objMessage As XMessage
    Protected objConstants As XConstants
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        objMessageDB = New XMessageDB
        objConstants = New XConstants
        objMessageDB.Open()
        Dim output As New
        output.InnerHtml += "Open: ERROR #" & objMessageDB.LastError & _
                            " (" & objMessageDB.GetErrorDescription(objMessageDB.LastError) & ")"
        output.InnerHtml += "<BR><BR>"
        If (objMessageDB.LastError = 0) Then
            objMessage = objMessageDB.Create()
            output.InnerHtml += "Create: ERROR #" & objMessageDB.LastError & _
                                " (" & objMessageDB.GetErrorDescription(objMessageDB.LastError) & ")"
            output.InnerHtml += "<BR><BR>" & vbCrLf
            If (objMessageDB.LastError = 0) Then
                output.InnerHtml += "Message Created with ID: " & objMessage.ID
                output.InnerHtml += "<BR><BR>" & vbCrLf
                objMessage.Direction = objConstants.MESSAGEDIRECTION_OUT
                objMessage.Recipient = "+31647134225"
                objMessage.Status = objConstants.MESSAGESTATUS_PENDING
                objMessage.Type = objConstants.MESSAGETYPE_SMS
                objMessage.Body = "Message Created with ASP.NET(VB)"
                objMessageDB.Save(objMessage)
                output.InnerHtml += "Save: ERROR #" & objMessageDB.LastError & _
                                    " (" & objMessageDB.GetErrorDescription(objMessageDB.LastError) & ")"
                output.InnerHtml += "<BR><BR>" & vbCrLf
            End If
            objMessageDB.Close()
        End If
    End Sub
End Class




thx...
harsha
 
Share this answer
 
Comments
Sandeep Mewara 2-Apr-11 3:32am    
Not an answer. Use comment feature to inform answerer. For code, you can edit your question at any given time.
Abhinav S 2-Apr-11 4:21am    
You need to declare output. That is what is missing.
Dave Kreskowiak 2-Apr-11 8:41am    
Without declaring what output is supposed to be, there's nothing that can be done.

Where did you copy this code from so we can take a look at what it might be??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900