Hi there,in one of my BOs ("LieferBO") I added a get-method I took from the help-file
and modified it to myBO-name and field-name.
[code]
Dim loCommand As New SqlCommand()loCommand.CommandText =
"SELECT COUNT(*) FROM liefer WHERE adresse = @pAdresse"loCommand.Parameters.Add(
"@pAdresse", SqlDbType.VarChar)loCommand.Parameters(
"@pAdresse").Value = cAdresseReturn CType(Me.ExecuteScalar(loCommand), Integer)[/code
But now I have the following problem which I can't solve by myself:
There are, for example the following records with the field "adresse" which is a char(6)-field:
B-M
BALM
BZ
I want to search, if there is a record with "BAL", which would be a valid new value, but the method returns 1 because it finds the "BALM"-record. I tried changing the var cAdresse to cAdresse.padr(6," ") which always worked with VFP-Views, but not here.
Can somebody advise me how this can be done?
Thanks in advance
Thomas