|
Hello guys,
I found that there is a problem with carring out a simple "SELECT" query with the KEYWORD "LIKE". Here is the code:
/////////////////////////////////
string sqlStr= "SELECT * FROM FilesData WHERE FilesData.FileName
LIKE '*filename.txt*'" ;
OleDbCommand oleCmd = new OleDbCommand();
oleCmd.CommandText=sqlStr;
OleDbConnection conn = new OleDbConnection("Provider = Microsoft.Jet.Oledb.4.0; Data Source = zbooboo.mdb");
conn.Open();
oleCmd.Connection = conn;
OleDbDataReader reader69 = oleCmd.ExecuteReader();
////////////////////////////////
The reader69.read() does not return any results while results are present in the table.
This code is working when the keyword "LIKE" is omitted.
Hope you can help me out with this one.
Thanks, Ofir
|
|
|
|
|
Try to use '%' instead of '*' as placeholder.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks, It is working now ...
It is so strange that while writing the SQL statement in the SQL editor within access ENV. it is working with '*' and when doing it from the .NET ENV. it is working with '%' ...
Anyway, thanks a lot
|
|
|
|
|
string sqlStr= "SELECT * FROM FilesData WHERE FilesData.FileName <br />
LIKE ('%filename.txt%')" ;
|
|
|
|
|
Thanks, It is working now ...
It is so strange that while writing the SQL statement in the SQL editor within access ENV. it is working with '*' and when doing it from the .NET ENV. it is working with '%' ...
Anyway, thanks a lot
|
|
|
|
|
Hi
Can anyone please tell me that how many states a window form has? And the order of execution of them? i.e init,load.....
Shahid
|
|
|
|
|
Hello
Well, you mean events not states. There are 3 WindowStates: Maximized, minimized, normal.
So about events, just revise the events of the Form class in your MSDN and you will get a good discription about each.
Regards
|
|
|
|
|
Hello,
I want to make a random road path like in Civilization 4 with smooth corners. How can I do it?
Best Regards,
Gywox
|
|
|
|
|
You didn't post enough information for anyone to give you a meaningful answer. What 3d library are you using? Are you using a game engine built atop some 3d library or programming against OGL or DX directly?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Dumbest. Movie. Title. Evaaar.
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
No game engine, making a map maker program with bitmaps as the end result. C#, GDI+, VS2005 simply.
/Gywox
|
|
|
|
|
|
Hi,
I would like to implement a multilingual windows application in 2.0. I have noticed that I don't have the same folders as the ASP.NET application (for global and local resources.) Can anyone tell me how do I perform such a task? if there are special folders and/or special file names that I should use and where to create them.
Thanks,
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hello
This is called Globalization and there is a namespace for that.
Here is an article about Globalization[^]. I hope it helps.
Regards
|
|
|
|
|
i want to make my form at the top from all form in my desctop ??
Palestine
|
|
|
|
|
did you ever use google before asking here?
or did you even check your forms properties??
i don't like people spamming useful boards with (sorry but) stupid questions.
so just as a future advise, try to do it yourself before asking and if you still fail -
use your brain before asking questions :P
i think everyone in here is willed to help you but nobody's gonna do as long as you keep on asking questions like the one you just have asked...
|
|
|
|
|
Hello
I too don't like people who try make things easy for themselves and post every little problem that faces them here. But I also don't think this should justify to us to flame them for asking simple questions like this. These forums has a place for begginers and newcomers.
We all miss things sometimes, or totally forget about a property or a method. This happens all the time. You should only flame those who come here asking you to do their homework, or simply demanding complete well commented code like they bought you from the slaves market!!
I revised your posts -and they were not too many - and saw some of your screw-ups. We all have them! and I don't think you'd appreciate it if someone flamed you for every little glitch you fall in.
I still remember a gentle nudge[^] Dave gave me about 3 weeks ago. I appreciated his gentleness.
Now if it was an advice that you were giving, it was very rude from you to put it this way! Now I advise you to help people out rather than just disrespecting them.
BTW:
Making 28 posts/year doesn't give you the title CP Spam-killer.;)
Regards
|
|
|
|
|
did you check his posts too? i would not have written this if it would have happened the first time. i completely share your point of view BUT there is a difference between forget ting a property and not even trying to find a solution by yourself. he writes like 5 posts per day and every single post would be solvable by using google.
i dont judge him for not knowing something (as you already said: i am very unexperienced too) but for not trying to find a solution (rather he lets other people find it). thats something he should learn as i had too (and most likely everyone in here).
you will notice i started writing in here like 2 weeks ago, if you check the postdates of my posts so i havent done much yet :P anyways i should be allowed to tell my opinion...
i like to contribute to forums as much as i am able to but that kind of posts (not yours - its still constructive) discourage me every time.
As already mentioned i dont care if that happens once or twice but he really does it like 3 times a day. Anyways, im sorry if it seemed like i was flaming - it wasnt meant to...
Greetings,
mik
|
|
|
|
|
Hello Mikone.
mikone wrote: did you check his posts too?
Yes! And sometimes they are frustrating.
mikone wrote: i started writing in here like 2 weeks ago
Welcome to CP! I'm happy that you had the chance to join us.
mikone wrote: i should be allowed to tell my opinion...
Sure! By all means you must say your opinion. My post wasn't about that. My post was because you used inappropriate words in your reply -which frustrated me-. That's was something I didn't like seeing in you, so I tried to nudge you for it -not flame you,and I hope the nudge wasn't too hot;P or rude of me.-, so that you'd notice that it was not appropriate. Please don't take it personal.
mikone wrote: that kind of posts (not yours - its still constructive) discourage me every time.
First, I appreciate your understanding.
Second, Nothing should discourage you from contribution. When you see a post that you don't like, just ignore it, or nudge the poser that did something inapropriate and unwelcomed in the forum. You'd notice that because of the great number of peple who don't google, Ed. Poore[^] made a unique signature at the bottom of all his posts. Look at it!!
Anyway, be patient. In these forums you will see many frustrating people. My top ten are:
1- People who coss-post.
2- People who repost.
3- People who give you their whole assignments.
4- People who demand -not request- well commented code.
5- People Who give you a report of their assignments without asking a real question.
6- People who want you to translate their code from a language to another.
7- People who ask for project ideas.
8- People who beg for help without specifying anything about their problem.
9- People who'd say they don't understand your answer just to make you post the whole code for them.
10- People who say they are having an error, or the code is not working without saying the error message or even posting the errorneous code.
My Advice:
1- Guid them to an article.
2- Search in google and give them the link of the search page.
3- Search CP and give them the link of the search page.
4- Nudge them to google or search CP avoiding being rude.
5- Give general advice with no code samples.
6- Give few code snippets and encourage them to look themselves for more.
7- If no hope, flame'em, but choose your words carefully.
I hope you don't take that as CP official guidlines. It's just my opinion that I wanted to share with you. I'm looking forward to seeing you on the forums regularly from now on. Nice to know you Mikone.
PS.
Don't be angry if someone avenges himself by giving all your articles and posts score 1.0
Extra Regards
|
|
|
|
|
Okay, now I got it I'm sorry for using words like stupid and you are right, this isn't the way one wants to be treaten!
You (by you I mean your posts look like you were an experienced and patient (forum)user :P I still have to improve those two "skills".
In future I'll try to avoid flaming at all and I also will choose my words more carefully than before :P (writing english without using german grammar would be great too )
However, thank you for your friendliness regarding the fact that i was acting like a fool. I guess we'll see each other soon (it's a small world )
(And I always like to retrieve criticism as long as it keeps being constructive as yours )
Greetings
|
|
|
|
|
Hello
In your form set TopMost property to true;
Regards
|
|
|
|
|
Hi,
Does anyone know of a way to retrieve the oplock value for a given file on a network resource?
Any help is appreciated.
Cheers.
|
|
|
|
|
i want to use this animated GIF image
http://www.shoppinp.com/loading100.gif
in my C# application
how can i see the animation ???
Palestine
|
|
|
|
|
Hello
You'd have to make a thread to animate it yourself.
1- Use Image.GetFrameCount() to get the numer of frames in the image
2- Use the above number as an upper limit in a for loop
3- Use Image.SetActiveFrame() to get the next frame each time
4- Build a new Bitmap using the above frame
5- Call Thread.Sleep() with the interval that suits you
Ps.
This article[^] may help you achieving the above.
Regards
|
|
|
|
|
Nader Elshehabi wrote: 5- Call Thread.Sleep() with the interval that suits you
Or rather the delay specified for the image frame.
---
b { font-weight: normal; }
|
|
|
|
|
Please follow up on the replies that you already got, instead of posting the same question again.
The people answering your questions may feel that it's very rude of you to just ignore them.
---
b { font-weight: normal; }
|
|
|
|