LIKE subquery

Shihtzu

Member
Joined
Nov 24, 2006
Messages
16
Programming Experience
Beginner
Hi,

How do i perform like sql subquery in vb.net ?

i tried

("SELECT petName FROM faculty where petName LIKE %'@teacherN'% ", connection)

command.parameter.add("@teacherN",textbox1.text)

but it doesn't return anything to me even though it should .. any idea?
 
even though i tried

("SELECT petName FROM faculty where petName LIKE '%@teacherN%' ", connection)

it cannot be done as well
 
Back
Top