|
In access try
Command.CommandText = "SELECT * FROM Users WHERE [User ID] = '*" + txtSearchID.Text + "*'";
|
|
|
|
|
you will want to use 'LIKE' instead of '='
example...
Command.CommandText = "SELECT * FROM Users WHERE [User ID] LIKE '%" + txtSearchID.Text + "%'";
of course what you really want to do is...
Command.CommandText = "SELECT * FROM Users WHERE [User ID] LIKE '%@1'";
Command.Parameters.Add("@1", OleDbType.Char).Value = txtSearchID.Text;
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I think he is using an access database, not Sql Server.
Better than %, he must use *
Command.CommandText = "SELECT * FROM Users WHERE [User ID] LIKE '*" + txtSearchID.Text + "*'";
but use parameters it´s a good choice.
|
|
|
|
|
I use % with access and it works fine. What does * do that is better?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Nothing into access it's better, but the "Jet sql" suggest using like with * as wild pattern.
If you use %, the OleDb Provider make the translation for you.
If you try
select * from table where field1 like '%something%'
in the query panel of access you get an empty result.
|
|
|
|
|
OK, well thanks for the info, is good to know
But either way in the context it is being used then it does not matter if use * or %
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Yes, it´s true, the performing is the same.
If you want to know more about old things like the tenebrous jet sql,
you have this
and about the wildcard characters here.
|
|
|
|
|
I have an interesting problem, but have no idea where to start, any help/links etc most welcome
The problem:
I want to create an c# app that any other application (eg, Word, Excel etc ) can print to (so i assume it would be a printer driver?? or printer queue??)
Once the file has been printed to the c# app I will save it out as a file in a specific location (hopefully as postscript).
How do applications like word send a file to a print driver? is it as a postscript file?
Thanks in advance for any comments
Mark
|
|
|
|
|
mark_w_ wrote: I want to create an c# app that any other application (eg, Word, Excel etc ) can print to (so i assume it would be a printer driver?? or printer queue??)
Well, you can not write printer app. There is no such thing. But you can write virtual printer driver. Then any application can use your driver to write (send) data to your driver.
You can not use C# to write printer drivers too. Too bad, you need Windows Driver Kit [^].
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I was just looking at virtual print drivers, thanks for the link, I may have to write a bit of C++.
|
|
|
|
|
Hi all,
i have a usercontrol array. In that whatever the control i want to delete am clearing that in delete button, using UserControl[i].Controls.Clear(), itz fine.
and finally..., i want to check everycontrol wether that was in clear mode or visible mode.
How to check?
Thanks In Advance
--Naren
|
|
|
|
|
I dont understand what you are trying to do. Do you want to access a control after you have cleared it? If so then you cant because clearing controls affectively deletes them
If you want something else then please try to explain again
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Actually i have a usercontrol with 4buttons(1 DeleteButton), 1 textbox
In my form am creating usercontrol array(more than one usercontrols), After clicking on delete of a perticular user control am clearing that usercontrol from my panel. but
After Clearing the controls not deleting from my panel.just making invisible(i observed in debugging that, in array list it is showing cleared control also)
i want to chcek each and every usercontrol(from array) wether that control was cleared or not.
i hope am clear with my description.
i tried on creating a bool property in my usercontrol, on clicking deletebutton am making false that bool value., while checking am checking that bool value wether true or false. if false it was cleared control.
any other way to achieve this?
--Naren
|
|
|
|
|
Hi ,
i-m looking around to work out a feature im my project but i did not see nothing about that or useful, i need to synchronize Window Media PLayer with a ListBox or better i wish show in a listBox the current song that WMP is playing in real time and when WMP change the song the list box will change in syncronize with WMP .
Do you know any way to work out this feature or have any idea to make me calm down?
Thanks in advantage and have a happy day.
Nice Regards
|
|
|
|
|
Does this[^] helps?
जय हिंद
|
|
|
|
|
Hi,
The idea is to read specific media player registers. to get current played song informations:
In .net you can use the RegistryKey class to have acces to registers:
Note: Reg path from WMP: Software\Microsoft\MediaPlayer\CurrentMetadata
RegistryKey regData = Registry.CurrentUser.OpenSubKey("Software\Microsoft\MediaPlayer\CurrentMetadata", false);
if (regData != null) //you have to do this check, to prevent from a null reference exception
{
string currSongTitle = regData.GetValue("Title", "No Title") as string;
//...
// Check google to see other WMP Keys...
}
Hope this help
|
|
|
|
|
Hi
first thanks for your fast reply,
i have 3 folders music(each week we will update music) and WMP will change each 4 hour a folder music with a Timer so i need a listbox that allow me to search a song and if i will change item automatically WMP will change song.
In my case can be useful RegistryKey class?
Sorry i'm beginner;
Nice Regards
|
|
|
|
|
Regex imagesRegex = new Regex(@"(\x3Ca\s+href=/imgres\" +
@"x3Fimgurl=)(?<imgurl>http" +
@"[^&>]*)([>&]{1})" +
@"([^>]*)(>{1})(<img\ssrc\" +
@"x3D)(""{0,1})(?<images>/images" +
@"[^""\s>]*)([\s])+(width=)" +
@"(?<width>[0-9,]*)\s+(height=)" +
@"(?<height>[0-9,]*)");
this was the html formatt google were using but now it doesnt work as here imgurl reffere group of original image and images reffer thumbnail hight and wight .please help.........
|
|
|
|
|
Okay, well, so what is it you want to do? Extracting the image-Url from google as I can see it. Do you get an error?
|
|
|
|
|
No, sir actually i am talking about An API for Google Image Search which is avilable on codeproject.com as auther said whenever google would change its html formatt we have to upadate that parsing code....as now i thing google have updated their html formatt hence this apllication not running it desnt show bug/exception but i m not getting result even single image .as it was properly working before 20 day.
Please help....
|
|
|
|
|
Hello Friends,
I want to convert video files to Flv format? Is there a sample code for this transaction except FFmpeg
to learn general aspect of converting?
Best Regards
Omegazafer
|
|
|
|
|
Hi everybody,
i've got an problem by starting an windows service on a remote server. This windows service should perform a database backup (from mysql to sql server) every day at a specified time (like a scheduler). I installed the service using installutil which is defined as local service with an automatically startup property. but every time i try to start this service manually the following error occurred:
Error 1053: The service did not respond to the start or control request in a timely fashion
I searched through the internet using msdn aso. but I only read about a bug in .NET Framework 1.0. I use .NET Framework 2 SP2 and also VS2008. Are there any problems if .NET Framework 3.5 is also installed?
Thx!!!
|
|
|
|
|
I am trying to develop a custom camera control, to use in my application. I access the camera with the SHCameraCapture api, however, this seems to give access to other functions within this dialog that I don't want the potential user to have access to, for example, changing the image resolution, saving the image to a location and sending via an SMS etc.
What I am after is a way to lock out all the other stuff that the camera api has, so that all the user can do is have access to 3 buttons, 'take picture', 'cancel' & 'ok'. How do I do this please, I have scoured the internet and all I can find is that there maybe a possibility to do it by having a C++ library using DirectShow within my C# application, which is most undesirable.
|
|
|
|
|
I take it the SHCamreaCapture API is not open source so you cant edit the source code yourself.
this [^]may help, there is some example code if you read down a bit
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I am capturing an image from a Windows Mobile device with a camera on the back. I'm not sure how closely this is to capturing a webcam stream, not entirely sure about this.
SHCameraCapture is native code, which I haven't yet found a way to edit it's code. It is derived from the Aygshell.dll library.
Can the code on that thread be modified to make use of an in built camera on a mobile device, or is there anyway to 're-write' the SHCameraCapture code?
|
|
|
|