Answer to Question #15479 in Visual Basic for benjie

Question #15479
hello! can any please help me?i have here my problem

Operator '&' is not defined for type 'Byte()' and string "|".

in Img = (dr(1)) & "|"

here's y codes


Dim Img As Image

Dim comm As New OdbcCommand
Dim dr As OdbcDataReader
conn.Open()
comm.Connection = conn

comm.CommandText = "select a.imgcatdesc, b.image from gallerycat_tbl a, gallery_tbl b where a.imgcatid = b.imgcatid"
dr = comm.ExecuteReader
countRec = 0
While dr.Read
descrec = (dr(0)) & "|"
Img = (dr(1)) & "|"
allRec.Add(descrec & Img)
countRec += 1
End While

comm.Dispose()
dr = Nothing
conn.Close()


please!
1
Expert's answer
2012-11-08T09:27:33-0500
Use AND operator instead of &

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS