|
Get the month and year from the user then use the DateTime.DaysInMonth method to get the number of days in that month.
When you have those two things, you can make two DateTime objects using the month and year supplied by the user. Use the 1st of the month to start the date range and the number of days returned by DaysInMonth to create the second date value.
There's your date range. You just supply those two dates to a couple of parameters in your SQL query (PLEASE USE PARAMETERIZED QUERIES AND NOT STRING CONCATINATION!!) to retrieve the data.
If you don't know what a parameterized query is, Google for "VB.NET SQL Parameterized Query".
|
|
|
|
|
Thank you, I might ask too much.....can you provide me some examples or links because I am still new to this.
|
|
|
|
|
|
Okay thank you very much.
|
|
|
|
|
i am doing a project which will display real time ecg on vb application.
i just wanted to know that.. is there any way that we can display ecg in vb6? How?
|
|
|
|
|
VB6 is deprecated, meaning that it's no longer actively supported. If you're going to write new software, use VB.NET.
Can you give me a good reason why this "needs" to be in VB6?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Dear friends,
i have been trying to get report in visual studio 2010 by passing parameters such as startDate, endDate and etc.
but i haven't done it yet
Can someone help me to generate this report by using report viewer .
preferred Language = vb.net
|
|
|
|
|
Hello all,
I want to try and do something that I think should be fairly easy, but I could be wrong. I want to have an icon in the system tray and it would change colors and blink depending on the system status.
Green - All systems are up and running
Red - There is a system down.
Yellow - Scheduled outage for today.
Orange - You are not connected to the network.
Ia m not sure how to even get started. I have written code, but not a lot of VB more VBA, ASP, Javascript. Would I create a service for this. I was thinking about having the icon check for a file.
So if the file is called Green.txt The icon would be green and if the user hovered over the icon or clicked on it the contents of the text file would be in the balloon or a message box could display the contents.
For Orange I was just going to ping a DC and if it did not get a reply then I know they are not connected to the network.
I have searched for hours to find something but I cannot seem to find anything.
TIA,
Rodger
|
|
|
|
|
You can't do this in a service. Here is an article that will show you how to create an application like you describe., Create a System Tray Application in VB.NET[^]
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Thank you for the article. I was able to edit the code to look for the file. I have a question do you know how I can have it check every 5 minutes for the file so I can change the icon and message when we have an outage?
|
|
|
|
|
RodgerDJr wrote: check every 5 minutes for the file
Use a timer.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
OK I am really new at VB so I need a little push . . . where would I add the timer, do I put that in the main section to call itself?
|
|
|
|
|
RodgerDJr wrote: where would I add the timer
You add the timer where ever it is that you want to use it.
RodgerDJr wrote: main section to call itself
Not sure what you mean by that. You instantiate the timer with an interval that you want the timer to fire, create an event for the timer to call when the interval expires and do whatever it is that you want to do in the event. http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx[^]
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
OK I am going to go try this. Thanks!
|
|
|
|
|
You're welcome
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
is there anything that can give me an example of encryption program with vb.net?
|
|
|
|
|
Plenty of examples to choose from[^]
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Yes, it's called "a programmer".
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
sorry if my question is inappropriate, I'm a newbie trying to make a program, I also already have an encryption program just that I still need materials for reference, once again I'm sorry
|
|
|
|
|
Yes, it's called a "serarch engine". Perhaps you've heard of Google, Bing, Yahoo, ...???
It's quite easy to find if you just type "vb.net encryption tutorial" into any of these search engines.
|
|
|
|
|
thanks for the advice
|
|
|
|
|
Heres one:
Encrypting a dataset using AES[^]
We generally like it when you try something by yourself first, and then ask questions when you are stuck on a specific issue.
|
|
|
|
|
I Have An Application That Prints On Remote printers
I Need To Check printer Status If Printer Is Not Ready Or Has Any Problem Like Either Its Offline Or Paper Jam Or Out Of Paper To Notify User And Abort Printing
As This An Application For A Restaurant And It Prints Order In The Kitchen So If Print Order Sent To Printer Of To Print Manager The User Will Assume That Order Is In Queue
If An error Message Is Displayed Of Any Error Then The Order Should Be Reprinted And An Error Report Is saved To Disk
Many Function On The Internet Found Is Not What I Am Looking For, As If Printing Is Offline The Status returned That Printer In Ready
Any Help On This Matter?????3
wahid kalo
|
|
|
|
|
wkalo wrote: Many Function On The Internet Found Is Not What I Am Looking For, As If Printing Is Offline The Status returned That Printer In Ready
Depends on the printer-driver. Is the driver says it's ready to print, Windows will not know that there's an error, until one is thrown during the actual printing. Meaning, you'll always get the same status reported as Windows does. What have you looked at?
The "old" way of doing this is to use a special roll of paper; when the printer is "nearly" out of paper, it turns a different color, alerting the person yanking out the order that he/she should replace the paper soon. Wouldn't that be preferred for a restaurant?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
You Are Correct In Some Cases
But When You Are Using Network Printer It Means Your Data Input In One Place And The Printer In Another, There IS No Way For The user To Know Or See That The Printer Is In Need of A New Paper Roll, Also if The Computer Where The printer Is Connected Went Offline And There Is And Order To Print, Technically the print Manager Assumes is printed But Actually the order Did Arrive To Destination
wahid kalo
|
|
|
|