|
For Now We Can Help ..! If the Same error comes agani Then What?You Will Post Again..1 I will tell You The Way to solve Your Problem
1)Keep a break Point on
mylogics wrote: string str = "UPDATE memberlogin SET Password='"+txtnewpassword.Text+"',Confirmpassword='"+txtconfirmpassword.Text+"'
WHERE MemberNo='"+txtusername.Text+"' AND Password='"+txtpassword.Text+"'";
and run it..!
2)press f11 as it passes that line part Mouseover on the string str You Will Get a Magnifier click on it You Will Get the Query in popup Window.Then You Can Test It..!
|
|
|
|
|
i have given the breakpoint:it shows:
str = "UPDATE memberlogin SET Password='0003',Confirmpassword='0003'WHERE MemberNo='0003'
AND Password='0003'"
as soon as it execute the query givs error...
|
|
|
|
|
Oh.. there must be a space just before Where statement .. I guess.
|
|
|
|
|
Hope You Got the Solution as Abi Suggests..!
|
|
|
|
|
The query looks good, the only possible problem that might took place is when Parameters like txtnewpassword, txtconfirmpassword,txtusername, txtpassword comes with some weird values.
Say I write txtnewpassword.Text = "0'--"
This is what we call SQL injection. So use like this.
string str = "UPDATE memberlogin SET Password=@newpass, Confirmpassword=@confirm WHERE MemberNo=@member AND Password=@password";
OleDbCommand cmd = new OleDbCommand(str, conn);
SqlParameter confirm = new SqlParameter("@confirm", SqlDbType.NVarchar, 50);
confirm.value = txtnewpassword.Text;
cmd.Parameters.Add(confirm);
.....
...
...
.. Do this for all other parameters.
Hope you got this more clear now.
|
|
|
|
|
i tried but prom is same....
|
|
|
|
|
mylogics wrote: i tried but prom is same....
What you have tried ? Did you give a space @where section in your code ? If yes then what error is coming now ?
|
|
|
|
|
yaaa i have given space at where as u told but still it gives error:
"syntax error at upadate statement".
i also tried using sqlinjection but same...
|
|
|
|
|
You've tried using sqlinjection?
Oh...
var question = (_2b || !(_2b));
--
Mr Mackey from South Park said:
And remember children, there are no stupid questions, just stupid people
|
|
|
|
|
UPDATE memberlogin SET Password='0003',Confirmpassword='0003' WHERE MemberNo='0003'
AND Password='0003'
use this Query and run it in sqlquery window
|
|
|
|
|
Hello, this is Vikash.
I Have a windows Service running on server and I want to Control it using my Web Application on the same server.
Anyone having any idea about it.
I just want to have control of stopping, starting or pausing a windows service running on server PC.
Any help would be appreciated.
Thanks in Advance.
|
|
|
|
|
You want to control Win Services that is running on the same server where your web server is hosted ?
|
|
|
|
|
Work with ServiceController class.
ServiceController service = new ServiceController(serviceName);
service.Start() / Stop() I am not too sure that ASP.NET account will have rights to perform these.
|
|
|
|
|
From server side you have access to any process using System.Diagonistic.Process
To stop / start service from ASP.NET use this:
int timeoutval = 20;
ServiceController svcController = new ServiceController("servicename");
if (svcController != null) {
try {
svcController.Stop();
svcController.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(timeoutval));
svcController.Start();
} catch (Exception ex) {
}
}
Remember to add <identity impersonate="true"/> in Web.config.
Also check if "Enable anonymous access" is disabled and "Integrated Windows Authentication" is enabled or not in IIS.
Hope this helps you.
|
|
|
|
|
Thanks for your responses,
That helped a Lot.
I am also posting a new Query related to VBScript, please if you could just see and give me some Idea.
I am really stuck on this issue and need to take a quick decision on it.
Pleaseeeeeeeeeeeeee Help me.
|
|
|
|
|
VikashGohil wrote: Thanks for your responses,
That helped a Lot.
But ensure that the web page that controls the windows service is protected under some authentication lest any Tom, Dick or Harry can run a bot for superflous overwhelming of your web server's service control manager.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Hello
I want to add thousand seperator in ASP .NET gridview to the value numbers. And the auto generated columns property set to true, so there are no columns that are already defined.
Waiting for the solution.
Thanks in advance.
|
|
|
|
|
In such case, modify you SQL to give you formatted output. See here[^]
|
|
|
|
|
actually i cant take it from sql, whatever i have to do is do it from code behind....
thnks for the reply, but any other alternative ???
|
|
|
|
|
|
hi,
Iam working with asp.net with c# in VS.Net 2008. And in a task of mine
I am fetching a data from the DB which contains a embed html for eg:
" <object width="230" height="155">
<param name="movie" value="http://www.youtube.com/v/Ab9kmqBmhXc&hl=en&fs=1&"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/Ab9kmqBmhXc&hl=en&fs=1&" type="application/x-shockwave-flash"
allowscriptaccess="always" allowfullscreen="true" width="230" height="155"></embed></object>"
In this fetched data i need to get only the
value="http://www.youtube.com/v/Ab9kmqBmhXc&hl=en&fs=1&"
or
src="http://www.youtube.com/v/Ab9kmqBmhXc&hl=en&fs=1&"
I need only the value or src(i.e) the url Bcoz i need to use that Url for some other purposes also.
Kindly help me in getting the value. Thanks in advance.
|
|
|
|
|
Use regular expressions to filter it. Please google for regular expressions patterns that can search url including query strings.
|
|
|
|
|
Thanks For ur Information
& I already Googled but not yet derived any suitable solution.
|
|
|
|
|
|
2 ways to do this.
1) Regular expression
2) Loading the content into XmlDocument and using XPath to query.
2nd method will be easy to implement. Sample XPath query,
/object/param[@name='movie']
This will give all param elements which have a name attribute with value movie . From this, you can easily get value of attribute value .
|
|
|
|