Whenever I have
Dim catID as integer
And I use this in a query like this:
cmd.CommandText = \"select * from categories where p
Try
cmd.CommandText = string.Format("select * from categories where parentid='{0}'", catID)
if parentid is a numeric field in your database then you'll need
parentid
cmd.CommandText = string.Format("select * from categories where parentid={0}", catID)