|
Haven't really used OleDb .Net classes but some of the providers are not able to bind values multiple times by name. Since you have the same parameter multiple times you could try using a unique parameter for each bind variable. For example:
... "(CompanyName1=@CompanyName OR @CompanyName2='') AND " + ...
...
com.Parameters.Add(new OleDbParameter("@CompanyName1", companyName));
com.Parameters.Add(new OleDbParameter("@CompanyName2", companyName));
...
|
|
|
|
|
It doesn't seem to be the problem, because I did the same with other queries
|
|
|
|
|
Not sure if any of these are wrong, however I notice some inconsistencies:
1. two parameters were added without an explicit constructor (StartDate, EndDate)
2. some field names don't have a table qualification in the WHERE clause (CompanyName, StartDate, Reminder);
3. you seem to be joining tables without using a JOIN keyword?
From the error message, I'd try #1 first.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Contrast this line (which, im guessing, checks equality or parameter not provided)
benams wrote: "(activities.ActivityTypeID=@ActivityTypeID OR @ActivityTypeID=0) AND " +
with this line:
benams wrote: "(Reminder=@Reminder OR @Reminder=false)";
=false does not work in SQL, change it to
@Reminder=0 like all the others.
|
|
|
|
|
insert blow content to ms-sql(2005) database.
"Hello.\r\n\r\n \r\n\r\nDo Do Do.\r\n\r\n \r\n\r\nhsNoh.gif Service / Kimss / Manager \r\n\r\n \r\n\r\nThank.\r\n\r\n \r\n"
After i read content in c#,
I can't read "\r\n \r\n" but i can \r\n?\r\n.
How can i read?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
You can't read utf8 unless it is in fact stored as unicode (or perhaps packed into another character set.)
If your database has something like nvarchar(2000) for the data type then it is unicode presuming that the person that put the data into it did it correctly.
|
|
|
|
|
Hi everybody,
I didn't know where to place this topic, so if mods consider that it should be elsewhere... no problem .
I'm developing a desktop application in C#. The first dialog it is a login form with user and password editboxes. I'd like to authenticate against a web service (using a database). Also, I'd like the connection was secure using SSL/TLS or whatever. I'm not sure how to do this, or if there is a better way to do remote authentication. I've been reading about WS-Security, SOAP... But before doing something, I wanted to ask here.
Thank you.
Regards
|
|
|
|
|
Hi,
I have a calendar control in my application (WPF Application), i have to do validation for this control, like if the user select a date or else enter a date which is less than the current day or Today, it has to show an error.
So will u tell me how can i do this, if possible with an example...
and is it possible to disable the dates for user selection in a calendar when it is less than the current day(Today), if possible, will u tell me how to do it...
Thanks
|
|
|
|
|
Take a look here[^], there are quite a few sample scenarios to help you.
I must get a clever new signature for 2011.
|
|
|
|
|
I am making outlook add-ins.
I made add-ins which is located outlook toolbar.
And now i want to add sub menu when i click mouse right button.
Currently, i reference msdn site but there is nothing about sub menu.
If you know site which i can reference
please let me know.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
buffering83 wrote: click mouse right button
This implies the secondary mouse button - and that is used for CONTEXT menus not sub menus.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
context menus can be hierarchical, Visual Studio has lots of examples.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: context menus can be hierarchical
Sure but the OP is talking about right clicking on an outlook menu bar, you do that till the cows come home and you will not get a sub menu.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You're right, except maybe about the cows, I don't know. I have been told they come home all by themselves, eager to get milked.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: eager to get milked.
Not according to AspDotNetDev, they come home to get Orked
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
well, he would know; I run a one-man shop.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thank you for reply!
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Thank you for reply!
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
The menu when you click the right mouse button is called a context menu, not a sub menu which is likely why you didn't find it on the msdn site.
This MSDN Link may be of help. I understand that the source is in vb, but it shows how to do this.
As well, this site appears to have some really good tutorials for add-ins. You may find some context menu stuff in there too.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Oh, This is what i am looking for!
Thank you!
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
I draw rectangle by use mouse but this rectangle drawing many time I mean many rectangle
result in one time and if click the button the rectangle disappear I want rectangle stil
in panel even click another button to draw another ship ..............how
help meeeeeeeee please............. 
|
|
|
|
|
How can we possibly help you?
We cannot see the code that causes you these problems.
The only thing that I can say is that if you are not drawing the rectangles in the panel's OnPaint event handler they will disappear each time the panel is redrawn.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
you did not provide any detail nor code, so all I can do is suggest you read this[^].
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
There are many members willing to help you, but your question is ambiguous.
What actually is the problem?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
your question is not clear. please be clear while asking question so we can help you 
|
|
|
|