|
hi sir
is there any way so that we can add sql connection to crystal report for any system.i mean i'll free to move my application on any system.there will no further login information ask by crstal report.
|
|
|
|
|
If you have Windows Authentication enabled and also Data Source is same for each computer, it will work.
But most of the people uses Named Instance rather than going for Default one. So its hard to have this.
Why dont you allow users to configure Web.config ??
|
|
|
|
|
sir is there any way from which crystal report access the connection string (oledb connection)from web.config.
if is it so then my problem may be solved
|
|
|
|
|
vikas shukla wrote: sir is there any way from which crystal report access the connection string
I dont Know Abt Tht..! I think You Are in trouble when using using Crystal Reports..!
But I tried in different way for this. It may Help or Not But try..!
Open It in Visual Studio ->Open any Crystal Report-->
On the top
CrystalReport-->Go to Field Explorer
-->Verify Database I think
Hope It Helps..!
|
|
|
|
|
Hi!
Is there a way to access a control in my MasterPage from my custom user control.
I have MasterPage with custom control --> Default.aspx --> User Control
And my last User Control needs to access the custom control in my master.
Or do i have to work with delegate in my default.aspx
Thanks! Wouter
|
|
|
|
|
How about
this.Page.FindControl("id");
Try it, I think it will find the control.
|
|
|
|
|
public partial class Administration_Controls_FileControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
Control control = this.Page.FindControl("MessageControl");
Gives back null
Control control = this.Page.FindControl("ctl00");
That gives my masterpage Not really nice id
|
|
|
|
|
hii all
m using update query to update the new paassword in my login table on button click.
it gives error:"syntax error in upadate statement".
the code is:
protected void Button1_Click(object sender, EventArgs e)
{
string str = "UPDATE memberlogin SET Password='"+txtnewpassword.Text+"',Confirmpassword='"+txtconfirmpassword.Text+"'
WHERE MemberNo='"+txtusername.Text+"' AND Password='"+txtpassword.Text+"'";
OleDbCommand cmd = new OleDbCommand(str,conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
}
plz guide wr m i wrong...
thanks...
|
|
|
|
|
mylogics wrote: string str = "UPDATE memberlogin SET Password='"+txtnewpassword.Text+"',Confirmpassword='"+txtconfirmpassword.Text+"'
WHERE MemberNo='"+txtusername.Text+"' AND Password='"+txtpassword.Text+"'";
Set breakpoint over here. Run you appliction, Copy the str value. Put it into SQL Server Query window and check what error it is throwing. This is the way you can identify your own problem !!
As per your code goes, Please be aware of SQL Injection !!!
|
|
|
|
|
|
sashidhar wrote: LOL SAme Solution..!
With Same time
|
|
|
|
|
There is a one minute gap between the posts anyway.
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!
|
|
|
|
|
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.
|
|
|
|