15,909,827 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by PaulVeeVee (Top 5 by date)
PaulVeeVee
5-Jul-11 21:43pm
View
Hi Marcus .... I tried adding the parameter like this too :
SqlParameter param = new SqlParameter("@Argument" + parameterIndex, SqlDbType.NVarChar);
param.Direction = ParameterDirection.Input;
string argValue = searchItem.Trim().Replace('_', ' ');
param.Size = argValue.Length;
sql.Parameters.Add(param).Value = searchItem.Trim().Replace('_', ' ');
But it still returns no results. So, I don't think the variable size is the problem. Any other thoughts?
PaulVeeVee
5-Jul-11 21:32pm
View
Hi Marcus, thank you for the reply - I tried it adding the parameter like this :
sql.Parameters.Add("@Argument" + parameterIndex, SqlDbType.NVarChar).Value = searchItem.Trim().Replace('_', ' ');
the searchItem is string
Should that be large enough? It still doesn't work though. Thanks!!
PaulVeeVee
30-Jun-11 0:53am
View
Hi JOAT-MON
That worked!! I have to admit, and I'm very embarrased, but I think my original first block of code also works, but your last one did too. It was my mistake as I kept getting no results when my data may have actually changed where it didn't have that combination of phrase / word. Again, thank you so much for all of your help!!
PTV
PaulVeeVee
30-Jun-11 0:15am
View
Hi JOAT-MON ... I really appreciate your trying to help. Unfortunately on that version I get this :
Msg 156, Level 15, State 1, Line 7
Incorrect syntax near the keyword 'AND'.
An expression of non-boolean type specified in a context where a condition is expected
(the whole section ---AND 'FORMSOF(INFLECTIONAL, Huntsville)');--- has the red squiggly line under it, so I could tell it wasn't liking it before I tried to Execute).
Any other tries? Thanks!
PaulVeeVee
29-Jun-11 23:36pm
View
Hi JOAT-MON ...thanks for the message. I tried that and received the following error :
Msg 7630, Level 15, State 3, Line 2
Syntax error near 'AND' in the full-text search condition 'FORMSOF(INFLECTIONAL,"Windows Administrator" AND Huntsville)'.
Any other thoughts? Thanks!