[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Operator '&' is not defined for types 'String' and 'System.Data.DataRowView'.

Posted on 2013-01-03
4
Medium Priority
?
1,777 Views
Last Modified: 2013-01-03
Operator '&' is not defined for types 'String' and 'System.Data.DataRowView'.
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim dtholidays As New DataTable()
        dtholidays = dateallreadybooked.mybookedhols("perkinj")
        Dim myhols As DataView
        myhols = New DataView(dtholidays, "", "", DataViewRowState.CurrentRows)

        For Each Dayitis In myhols
            Mybookedlabel.Text = "<td align='center'>" & myhols.Item("Date") & "</td> <td align='center' >" & myhols.Item("Timeofday") & "</td> <td align='center'>" & myhols.Item("Type") & "</td><td align='center'>" & myhols.Item("bookedon") & "</td>"

        Next

         End Sub

Open in new window

0
Comment
Question by:runnerjp2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 26

Expert Comment

by:EddieShipman
ID: 38740659
Try:

Mybookedlabel.Text = "<td align='center'>" + myhols.Item("Date") + "</td> <td align='center' >" + myhols.Item("Timeofday") + "</td> <td align='center'>" + myhols.Item("Type") + "</td><td align='center'>" + myhols.Item("bookedon") + "</td>"

Open in new window

0
 

Author Comment

by:runnerjp2005
ID: 38740698
BC30452: Operator '+' is not defined for types 'String' and 'System.Data.DataRowView'.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 38740761
Item is not a String and Option Strict is probably set to On (which is a good thing).

Try adding ToString after each of the items: myhols.Item("Date") .ToString()
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 38740781
Yep, I didn't see that one.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question