|
sugunavathysubramanian wrote: new SqlConnection("server=.;initial catalog=master;user id=sa;password=sa;");
Your database administrator should really be kicked with a wet towel till he understands the folly he has created:
1) Allowing others to tamper the master database
2) Having a weak password for sa account.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Completely agree. Please, the English language has tools for letting people understand each other.
Anyhow, maybe you should consider changing the query and use the DB server date, something like SELECT * FROM tablename WHERE date = GETDATE() [if on SQL Server].
Kazz
"Users are there to click on things, not think. Let the archs do the damn thinking."
|
|
|
|
|
we are not opening the website.ok how to get system date ..do u get my point.
|
|
|
|
|
sugunavathysubramanian wrote: we are not opening the website.ok how to get system date ..do u get my point.
How do you expect the code to be executed if the website isn't running?
You do understand how websites, the internet and the HTTP protocol works, don't you?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
No idea about what you really mean with 'not opening the website' , but anyhow, in the code you posted before...
string month, yearr, datee, systemdate;
month = DateTime.Now.Month.ToString();
yearr = DateTime.Now.Year.ToString();
datee = DateTime.Now.Day.ToString();
systemdate = Convert.ToString(month.ToString()) + "/" + Convert.ToString(datee.ToString()) + "/" + Convert.ToString(yearr.ToString());
SqlConnection con = new SqlConnection("server=.;initial catalog=master;user id=sa;password=sa;");
con.Open();
SqlCommand cmd = new SqlCommand("delete from no where date='" + systemdate + "'", con);
cmd.ExecuteNonQuery();
con.Close()
What about...
SqlCommand cmd = new SqlCommand("delete from no where date= GETDATE()", con)
That's what I originally meant.
Kazz
"Users are there to click on things, not think. Let the archs do the damn thinking."
|
|
|
|
|
I would suggest you two things:
1) Prefer stored procedures instead of such queries.
2) Use Google first. These are little queries that Google can help you in a jiffy without having to wait for some one to respond and assist you through.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Dear All,
I have requirement like creating a word document with some data. Once it is created , that word document should me saved on the client system.
Please help me solve this.
|
|
|
|
|
Search the web for 'Word automation' and you'll find plenty of information on controlling Word programmatically.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks for your replay,
I am able to create word document by Application Class. What i required is once the document is created
it should prompt to user to save or open the document in other window.
|
|
|
|
|
Then you can temporally save the file on the server, then redirect the user to the file, and browser should automatically prompt the user to save or open the file. I believe...
Kazz
"Users are there to click on things, not think. Let the archs do the damn thinking."
|
|
|
|
|
how to use window service in .net with c#?
tel me something about window service
|
|
|
|
|
You can get lot of information regarding these topic if search this with google.
Apurva Kaushal
|
|
|
|
|
nithydurai wrote: tel me something about window service
It's a service. It runs in Windows.
Any more information, I suggest you search the web or buy a book. Oh, and in future, read the forum rules before you post, particularly numbers 2 & 3.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
or ask rajkumar.3 he seems to have a soft spot for useless programmers
|
|
|
|
|
.netman wrote: or ask rajkumar.3 he seems to have a soft spot for useless programmers
Who is he?
Apurva Kaushal
|
|
|
|
|
he is a user, look down a couple of topics and you will see his post
|
|
|
|
|
Ohh.
And all this soft spots he got in one day(he joined here only one day before).
Apurva Kaushal
|
|
|
|
|
There is a website called Google and it is located at this URL http://www.google.com/[^]. If you type your query there, it would guide you to appropriate tutorials instantly. Wonder what it is? It is 'Internet Magic'.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi there,
I created a web page which inherits masterpage.
In my web page, i'm having two buttons. when ever that click event occurs, i want that page to be postback. I'm using trigger and all.
But postback is not working. If i'm using asp:Scriptmanager, for all the event it's post backing. But i want only for buttons.
Below is my code:
In masterpage i've written as:
<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
and in web page,
<atlas:UpdatePanel ID="TimeRecordPanel" runat="server"><br />
<ContentTemplate> <br />
<asp:Button ID="BtnAddRecord" runat="server" CssClass="ColorButtonOver70_New" Text="Save"<br />
OnClick="BtnAddRecord_Click" /> <asp:Button ID="BtnReportCancel" runat="server" CssClass="ColorButtonOver70_New"<br />
Text="Reset" OnClick="BtnReportCancel_Click" CausesValidation="False" /><br />
<br />
</ContentTemplate><br />
<Triggers><br />
<atlas:ControlEventTrigger EventName="Click" ControlID="BtnAddRecord" /><br />
<atlas:ControlEventTrigger EventName="Click" ControlID="BtnReportCancel" /><br />
<br />
</Triggers><br />
</atlas:UpdatePanel>
Please help..!!
Regards n Thks
Sam.M
|
|
|
|
|
Have you got an event set up for the onclick for the buttons, please post code if you do
|
|
|
|
|
Hi,
I have a page having a panel that contains a gridview and a chart.
My problem here is that i want only the contents inside the panel to be exported to excel on a button click..
I tried using the render control, but it says gridview has to be within Form tag with runat server, and even the chart image is not coming.
Thanks in advance!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
hi friends..
i want to enter multiple data's , like sales invoice. Does anybody have idea. Page should not postback.
cheers..
|
|
|
|
|
Perhaps you should search on google for what you want
then start coding something
then post back here
You need to explain more about what you want
|
|
|
|
|
hello .netman searching in google every body know it dude... but u know we dont get exactly what we r looking in google...this is live for developers thats why we post req here .. and please dont suggest again google to any body coz even a small chield using google after searching in google only they come here..
|
|
|
|
|
When someone puts a message like the one below it clearly suggests that they haven't actually written any code and are just fishing for someone to chuck a load of code up for them to copy.
If they knew how to code then they would have posted a question which contained a snippet of code which they were struggling on.
I will suggest google to anyone who is fishing for a large bit of code to be given to them so they can just copy it and take the credit.
Maybe you should concentrate on helping people rather then picking at other people's posts
"i want to enter multiple data's , like sales invoice. "
|
|
|
|