Y
Yogi
I wrote simple application (C#) that use a database (MS SQL serwer)
and I had very strage problem
I want to have pramized query, so my code is...
SELECT name
FROM person
WHERE (name LIKE N'%'+ @partOfName +'%')
I used VS 2005 with MS SQL server Express Edition I used this query in
Designing Queries and Views under "Query Builder"(wizzard). I had
filled in the form which vs 2005 display me after I pressed "Execute
Query"and it produce i.e. one row.
But when I start my application and I fill in my form with the same
text it doesn't produce anything (no rows)... I used SQL Server
Management Studio Express and I applied the same query there with the
same text and it produces one row...
When I use another Database Tool named "Preview data" in VS2005 it
behaves like my application...
Another threat in this case is if my 'name' in person table is
"Mike "(with spaces) and I put as the parametr "Mike" it produce
me one row but when I put "ike" it failes.
Any ideas?
I took me 4 hours to trace this problem without a solution...
I think it's MS's fault... What do you think?
Try it and abuse MS that they have the problem....
and I had very strage problem
I want to have pramized query, so my code is...
SELECT name
FROM person
WHERE (name LIKE N'%'+ @partOfName +'%')
I used VS 2005 with MS SQL server Express Edition I used this query in
Designing Queries and Views under "Query Builder"(wizzard). I had
filled in the form which vs 2005 display me after I pressed "Execute
Query"and it produce i.e. one row.
But when I start my application and I fill in my form with the same
text it doesn't produce anything (no rows)... I used SQL Server
Management Studio Express and I applied the same query there with the
same text and it produces one row...
When I use another Database Tool named "Preview data" in VS2005 it
behaves like my application...
Another threat in this case is if my 'name' in person table is
"Mike "(with spaces) and I put as the parametr "Mike" it produce
me one row but when I put "ike" it failes.
Any ideas?
I took me 4 hours to trace this problem without a solution...
I think it's MS's fault... What do you think?
Try it and abuse MS that they have the problem....