Hi guys,
(Using .net cf 2.0)
I have the following sql statement:
VB Code:
With sqlCmd .CommandText = "SELECT count(*) FROM photos WHERE photoLocation LIKE '" & H42_PHOTO_DIRECTORY & "%'" '.Parameters.Add(New SqlCeParameter("@photoLocation", H42_PHOTO_DIRECTORY & "%")) Dim assigned As Integer = .ExecuteScalar MsgBox(assigned) '.Parameters.Clear() End With
But it always returns 0 when i know that it shouldn't
(by the way H42_PHOTO_LOCATION is a folder on my Pocket PC.) I need it if possible to be done using parameters. Can anybody tell me why this isn't working?
Thanks in advance for any help
![]()




Reply With Quote