|
U will have to write Windows Service which will check Birthday Dates everyday morning or ur schedule time and so u can display this...
|
|
|
|
|
Cant I just use system date and compare that with the date in the database??
kagiso
|
|
|
|
|
I suspect the guy who answered you is joking, perhaps because what you're asking seems so straightforward. Yes, you can work out the age using DateTime.Now. And the DB gives you the dates to put in the date picker. So, which bit do you need help with ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for your kindness.My problem is using the identity number from the database, i.e 840920 5993 081.I want to use this to establish when this person's birthday is.For example if its 841112 5993 081 then I should have a message that this person's birthday is today.And the same for those that celebrate tomorrow.
Thank you so much again.
kagiso
|
|
|
|
|
So you're starting with the person's Id and want to know if just that person has a birthday ? So you want SQL like
select Birthday from person where id='845834534'
you can add a check for if the birthday is today or tomorrow, but you still need to check in code if it's today, or if it's tomorrow, so you may as well do all your checking there. getdate() is how you get today's date in T-SQL. But be careful, if you have a time component to either of the two dates you're checking, they won't be equal. DateDiff may be a better way to go.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
What I have in mind is take the first six and say sumthing like select Birthday from Person where the "month and day" = today. Then display the results or the person's name.
i.e. if the first six = 831112 then I will take the 1112 and check that.The problem is I dont knw how to go about doing that.Hope u understand me
kagiso
|
|
|
|
|
Try this query from your database:
SELECT Name from tablename where month(DOB)=month(getDate()) and day(DOB) = day(getdate())
God is always with you.
|
|
|
|
|
I will sure try this and see what I get
kagiso
|
|
|
|
|
Server: Msg 156, Level 15, State 1, Procedure GetPagedProducts_sql2k5, Line 18
Incorrect syntax near the keyword 'WITH'.
Server: Msg 195, Level 15, State 1, Procedure GetPagedProducts_sql2k5, Line 20
'ROW_NUMBER' is not a recognized function name.
|
|
|
|
|
1 - try thinking of a more intelligent subject
2 - try reading the sticky post on how to ask questions
3 - looks like this is a SQL question, so ask it there
4 - we can see that your SQL is broken. We can't see the SQL itself, so how do you expect us to help you fix it ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This forum is for ASP.NET question only.. Are you getting this error in ASP.NET project???
-- modified at 4:51 Monday 12th November, 2007
|
|
|
|
|
we can't help you by reading the bit's and parts of your error message. what is the problem? What are you trying to do?
Regards - J O H N -
|
|
|
|
|
hi
can anybody help me in identifying the error in the following code.It am binding data to crystal reports the code follows like this:
Dim myreports As New ReportDocument
Dim dt As DataTable
dt = trackFac.ActivityFullReportCR(DropDownList1.Text, Right)
myreports.Load(Server.MapPath("CrystalReport.rpt"))
myreports.SetDataSource(dt)
CrystalReportViewer1.ReportSource = myreports
CrystalReportViewer1.DataBind()
padma
|
|
|
|
|
You don't have to do call the DataBind() method when you set the ReportSource.
Regards - J O H N -
|
|
|
|
|
ok i will try it thanks
padma
|
|
|
|
|
Hi,
I am working with crystal reports XI. When exporting the crystal reports, by default "Crystal Reports (RPT)" is selected in the FileFormat dropdownlist.
Is it possible to set this option as "Microsoft Excel 97-2000 data only (XLS)"?
Please if any one knows about it reply me.. I need the answer urgently..
Thankfully,
jm
|
|
|
|
|
Have you tried this code??
' Declare variables and get the export options.<br />
Dim exportOpts As New ExportOptions()<br />
Dim diskOpts As New DiskFileDestinationOptions()<br />
Dim excelFormatOpts As New ExcelFormatOptions()<br />
exportOpts = Report.ExportOptions<br />
<br />
' Set the excel format options.<br />
excelFormatOpts.ExcelTabHasColumnHeadings = true<br />
<br />
exportOpts.ExportFormatType = ExportFormatType.Excel<br />
exportOpts.FormatOptions = excelFormatOpts<br />
<br />
' Set the export format.<br />
exportOpts.ExportFormatType = ExportFormatType.Excel<br />
<br />
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile<br />
<br />
' Set the disk file options.<br />
diskOpts.DiskFileName = fileName<br />
exportOpts.DestinationOptions = diskOpts<br />
<br />
Report.Export()
ref: http://msdn2.microsoft.com/en-us/library/aa288404(VS.71).aspx
|
|
|
|
|
Hi Sync,
Yes I tried the code, but I could not get you what "Report" means in the code. Is this the ReportDocument Name or something else?
Also the
diskOpts.DiskFileName = fileName (filename??) what value can I give to it?
Is it the name of the xls file which is to be store the exported report? It must be set at runtime isnt it? I am not sure about it..
Can you clarify my doubts, please?
Thankfully,
jm
|
|
|
|
|
HI,
First :
Can Anybody Point's me to a good Source (i did'nt Find in Google, That's Why i'm Asking)
to Learn How To handle Pervasive in asp.net (specially using the GridView, if Availbale)
Second:
i Want to Change the gridview row style from view to Edit(in run time)
how can i do that?
Thank's in advance
Have Fun
Never forget it
|
|
|
|
|
For GridView take help of the following link:
http://www.gridviewguy.com/Articles.aspx
Hope u get help from this site???
|
|
|
|
|
THANKS
Have Fun
Never forget it
|
|
|
|
|
This is the nature my problem. Am loading some javascript on Page_Load using RegisterClientScriptBlock.
In the body of a function in my code behind, am looping through the rows in a grid view as I validate some values as follows:
For Each row As GridViewRow In MyGrid.Rows()
If row.Cells(0).Text = ""
'''''I WANT TO CALL A JAVASCRIPT FUNCTION THAT WILL DISPLAY A MESSAGE'''''
End If
Next
Help me know how I can call the javascript funtion that was loaded at Page Load. My searches on the web appear only to give me examples of how I can associate the javascript function with an event, say the click of a button.
Thanks in advance.
|
|
|
|
|
U will have to Register it on RowDataBound Event of GridView...
Check this www.gridviewguy.com/Articles.aspx site for more help...
|
|
|
|
|
Hi,
I am very fascinated towards creating Wiki. Any good article or suggestion how to it with ASP.Net. I dont have much about wiki's from where I should start??
|
|
|
|
|
Actually, there are a lot of C# Wiki engines on the net.. Why don't you pick one ?? As those are the opensource projects, you can read their source code...
Open Source Wiki Engines in C#[^]
|
|
|
|