|
|
I'm new in this community, and i begin with a question which is: If i have a Database with 1 table(commitmentsTable) and 2 fields (Date, commitment) what query i can use to have the commitments for the current date? Thanks and bye
By Windows M
|
|
|
|
|
What format is the commitment date in? You should be able to use a query (in MS Access a Select query and in the criteria section of the field put commitmentsTable.commitment = Date(). However, if you have a timestamp behind your date you may have to first format the commitment date.
-- modified at 16:27 Tuesday 5th June, 2007
Please note that you are posting this in the wrong forum. Since you are asking a query question it should probably be in the SQL board. Other MS Access questions about VB should be put in the VB lounge.
__________________
Bob is my homeboy.
|
|
|
|
|
Like Leckey said, it should be posted on the SQL forum but
SELECT * FROM commitmentsTable WHERE [Date] = Date()
should work even if there is a timestamp value. I assume that you only want to check the date is equal to the current date and are not concerned about time.
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Thanks smyers
Bye
By Windows M
|
|
|
|
|
I am currently trying to design a project that will dynamically load different inherited user controls.
I have a base class named "PageBase" which extends UserControl. All of the inherited user controls will extend from PageBase.
Here is what I am trying to do but cannot think of a way to do it. "Joe" comes along and wants to add some page into the system. He creates a new project that is an inherited control from PageBase. When this new project is created I would like Visual Studio to inform him that he has to implement the function "string foo()".
I am trying to make the extension as easy as possible and I do not want someone to have a new class that looks like Class1 : PageBase, SomeInterface
Using the designer is also a big portion of this project so I cannot take the route of an abstract UserControl class. What is an easy way to have VS inform the coder that certain methods must be implemented when someone creates the inherited user control? Thanks for the help. Please let me know if anything needs to be explained more.
|
|
|
|
|
You have two choices; an abstract class, or interface.
Since you don't want to use either you need to redesign your application, or rethink your strategy.
only two letters away from being an asset
|
|
|
|
|
I know most of you will cringe as you read this but my office has not moved to AD and still uses an NT domain. I've noticed an issue and am not sure if it is related to NT domains or just basic encryption "gottcha". I'm using ProtectedData.Protect() method to encrypt data with the CurrentUser scope. When I change my domain password according to our domain policy I can no longer decrypt data that has been encrypted with the previous password (Exception = {"Key not valid for use in specified state.\r\n"}). Is this an issue inherent with using the CurrentUser scope ? I've seen a previous post where the CurrentUser scope was a viable solution and did not cause issues with password changes, but that person was using an AD domain. Anyone have any experience with this issue or a work around ?
|
|
|
|
|
Hi.
how can I pass a parameter from code to a report (Crystal Report)?
Suppose, I have a table with these fields (ID,Name), now I want to send an ID from code and in my report, the Name of that ID be displayed.
Best wishes
|
|
|
|
|
You can use
CrystalReport1.DataDefinition.RecordSelectionFormula = "ID = " + value;
CrystalReport1.Refresh();
It seem to be a solution or an answer.
|
|
|
|
|
hello
i'm trying to develope a c# software to control
call status and tonedetection while using handset connected
to a motorola 56000 modem to make the call.and i connected the pc
to the modem using the serial port and i use the other jack on the modem to
connect the telephone line that come from the service provider.if some got the code for such type of application please send me.
thanks for your help.
thanks
|
|
|
|
|
One post is enough. Pick one and remove it.
only two letters away from being an asset
|
|
|
|
|
hi
i'm trying to develope a c# software to control
call status and tonedetection while using handset connected
to a motorola 56000 modem to make the call.and i connected the pc
to the modem using the serial port and i use the other jack on the modem to
connect the telephone line that come from the service provider.if some got the code for such type of application please send me.
thanks for your help.
thanks
|
|
|
|
|
Reposting the same question the next day without answering the questions that were asked on your previous attempt will just get you ignored.
|
|
|
|
|
Hi, Does anyone know whether there is a TryCatch-Snippet wich can built try{}catch{}-blocks with all possible Exceptions thrown by a Methode ?
or
Is there a way to create such a snippet ?
|
|
|
|
|
I don't know if such snippets exist but I know that you can create your own snippets
|
|
|
|
|
There isn't one. How would it be possible for the snippet manager to know all Exceptions possible from a method, especially if the method made calls other methods in an external assembly?
only two letters away from being an asset
|
|
|
|
|
try
{
}
catch(Exception error)
{
}
will catch all exceptions. However, this is not a recommended practice since it will also catch unrecoverable or systems exceptions (e.g. System.OutOfMemoryException, SecurityException, ThreadAbortException, etc.)
The best practice is to catch only the exceptions you can recover from. Otherwise, don't handle them.
|
|
|
|
|
Judah Himango wrote: will catch all exceptions
Well, not all, only .NET exceptions. To catch all exceptions, you have to specify a parameterless catch:
try {
} catch {
}
---
single minded; short sighted; long gone;
|
|
|
|
|
Right, it will catch all .NET exceptions.
An empty catch will catch non-exception objects -- CLI languages are urged, but not required to, throw only System.Exception objects. However, I wouldn't call those exceptions anymore; those are thrown objects, not thrown exceptions, right?
|
|
|
|
|
Judah Himango wrote: However, I wouldn't call those exceptions anymore; those are thrown objects, not thrown exceptions, right?
I would call an exception an exception, regardless of what object is thrown to handle it. The exception is the situation, not the object.
---
single minded; short sighted; long gone;
|
|
|
|
|
Ah, see, when I was talking about exceptions, I was talking about System.Exception-based classes. Anyways, I suppose it's not such a big deal.
*edit* after looking into this a bit, I see the framework also refers to non-System.Exception objects which are thrown as "exceptions" in the documentation - interesting! So, you were right.
Another interesting side note is the System.Runtime.CompilerServices.RuntimeCompatibilityAttribute which tells the CLR to wrap all non-System.Exception "exceptions" in a real exception class before throwing it.
|
|
|
|
|
I read somewhere that this has changed in .NET 2.0 and you don't need empty catch blocks anymore.
Kevin
|
|
|
|
|
There is a System.Runtime.CompilerServices.RuntimeCompatibilityAttribute for assemblies that tells the runtime whether to wrap all "exceptions" that do not derive from System.Exception with a System.Runtime.CompilerServices.RuntimeWrappedException. Maybe that's what you're thinking of?
|
|
|
|
|
Hi,
I'm struggling with a problem. I want to catch a 'WM_COPYDATA' event that occurs in a C# application.
I send a data from a C++ application. The bridge is correctly done I think.
So, sometimes it works, usually when my C# application is active.
But most of the time, it doesn't work, because when trying to catch the appropriate WM_COPYDATA message in WndProc overrided method of my C# application, the program stays catching a couple of other messages like: WM_WINDOWPOSCHANGED, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_ACTIVATE and so on.
Doing so, it almost never catch the WM_COPYDATA message that I sent from my C++ application.
Can you help me please ?
Thanks.
P.S.: I catch messages in my C# application like this:
protected override void WndProc(ref Message m)
{
string g = m.ToString();
if (m.Msg == WM_COPYDATA)
{
// instructions.
}
}
p.f. Goudjo-Ako
Bringing our energy together !
p.f. Goudjo-Ako
Bringing our energy together !
|
|
|
|