|
Hi,
I have one field in database which is being updated by other process and this value is populated into the master page controls. I want to update this value on client browser as soon it is changed but I am running out of ideas.
any aproach to acomplish this would be highly apreciated.
Thanks in advance.
Regards
Prem.
|
|
|
|
|
If you are using SQL Server 2005 or 2008 have a look at SQL Notification Services, but be warned they can put a lot of load on the server.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
mobius111001 wrote: Does anyone know of any common errors
Yes, using an outdated version that can't handle the load.
mobius111001 wrote: or is it just possible I may be doing more work that this DB has ever seen??
Without knowing anything about the work are doing it is impossible to make that determination.
only two letters away from being an asset
|
|
|
|
|
Pretty much take a bunch of data from one table, saving it to a list in memory, going through the list, processing a record, and possibly writing data back to the db. It is being processed one record at a time.
|
|
|
|
|
Shouldn't be a problem. Maybe log file space/disk space/fragmentation?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hi all ,
this my codebehind on login button click
FormsAuthentication.Initialize();
FormsAuthenticationTicket ObjTicket = new FormsAuthenticationTicket(1, txtLoginId.Text, DateTime.Now, DateTime.Now.AddMinutes(60), false, txtLoginId.Text + "," + txtPassword.Text, FormsAuthentication.FormsCookiePath);
string encTicket = FormsAuthentication.Encrypt(ObjTicket);
string sLoginId = txtLoginId.Text;
sLoginId = sLoginId.Replace(" ", "");
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
Response.Redirect(FormsAuthentication.GetRedirectUrl(txtLoginId.Text, false)+"?id="+txtLoginId.Text);
and this is web config code
<authentication mode="Forms">
<forms defaultUrl="~/PresentationLayer/Forms/Main.aspx" loginUrl="~/Default.aspx" >
</forms>
</authentication>
above code well working on local host .......but on live host
"~/" append with url
for example i want
www.abc.com/abc/PresentationLayer/Forms/Main.aspx
but i get
www.abc.com/abc/~/PresentationLayer/Forms/Main.aspx
can anybody tell me that where is problem
|
|
|
|
|
|
I have been thinking of using crystal reports over Microsoft Report Viewer but both of them confuse me a little.
Here is why...
SQL Server already has the tables so in my logic of building reports in the past is I provide the following:
1) the sql connection string
2) The SQL Statement containing the fields names the report is wanting
3) Identify the report file
Then the report is generated.
But What I am noticing is I have to add an extra step I do not want to do. Which is creating a dataset.xsd file to have my sql statement load the data directly into.
What I want to know is how to build a report in a c# application that will use the applications connection string (because the database and or server will change names) and Allow me to pass a SQL statement directly into the report. What would be real nice is if I could have the report file external to the application so I can simply replace the report file when changes need done instead of having to recomplile the whole application, as well as dynamically call a report if the file exists and if not ignore the report.
|
|
|
|
|
JollyMansArt wrote: I am noticing is I have to add an extra step...Which is creating a dataset.xsd file
Why? Using the ReportViewer you just point to a SQL Reporting Service report, either local (rdlc) or remote (rdl). The data connection is in the report, no datasets involved.
only two letters away from being an asset
|
|
|
|
|
It is fine to have the data connection in the report but for both the crystal report and Microsoft report viewer I can not dynamically update or change the connection string to where the data is. As the application will be installed into another database and different server locations. So the applications connection string will become different than the reports connection string.
|
|
|
|
|
JollyMansArt wrote: I can not dynamically update or change the connection string
Why not?
Expression-based connection strings are evaluated at run time.
Add a report parameter to specify a data source. For parameter values, you can either provide a static list of available values (in this case, the available values should be data sources you can use with the report) or define a query that retrieves a list of data sources at run time.
http://msdn.microsoft.com/en-us/library/ms156450.aspx[^]
only two letters away from being an asset
|
|
|
|
|
I don't know what I am doing wrong to get the reports to work. I can build the reports, placing the connection string into the report itself and it works. But I can not pass a connection string to the report. I need an example to build from.
|
|
|
|
|
Can somebody give me the C# Compiler rules file? I'm using Visual C++ 2008 Express Edition, and I have the C# Compiler v3.5 for .NET 3.5. I want to be able to compile C# source files in my IDE.
Replies and Questions are welcome
|
|
|
|
|
AFAIK M$ deliberately 'cripple' the express editions to prevent you from doing this. Some one might know different, but I think that is correct.
You could always download Visual C# Express, compile your code to a Library with it and add a reference to your C++ solution. At a pinch, you could compile it from the command line using csc.exe (the C# compiler, a quick google will give you the appropriate parameters).
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Not sure I understand what you want.
the C# compiler is part of .NET, not Visual Studio.
it could be found as C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe
(the exact path depends on your .NET version).
and the csc help appears when giving "csc /?" at the "DOS prompt"
|
|
|
|
|
I know that! I copied the C# Compiler to the bin folder at Visual C++ root. What I'm talking about is about a file of extension ".rules" that contains the rules for compiling the sources files like the rules file for compiling ".asm" files
|
|
|
|
|
I don't have a rules file on my disk, and yet I compile C# code every day.
And I wouldn't know what would be "rules" for a compiler. Also I don't see "rules" mentioned
anywhere in the CSC help. Can you give some examples?
|
|
|
|
|
|
OK, that is new to me. I created my own IDE for C and C#, for C# it calls csc.exe directly, and for C it uses third-party compilers, not MS ones. That's how I never encountered rules.
Looking here[^] I see rules stuff in the Visual Studio C++ branch, not in the C# branch.
And I don't see much use for such rules thing in a C# environment, where code is always managed code and gets translated into IL instructions, without calling on other tools.
|
|
|
|
|
I think it's better to do a custom build step to all C# source files
|
|
|
|
|
I have no more problems. I've just downloaded a C# Editor similar to Visual C#, with form editor too, since the Visual C# is installed throw the internet instead of being installed from the full package.
I've downloaded it here[^]
|
|
|
|
|
Hmm... how about downloading Visual C# Express Edition ?
You can install both C# and C++ Express Edition.
|
|
|
|
|
That should be included with Visual C# 2008 Express - install that, and find the files you want.
I presume you want to hack it so that you can use C++ and C# projects together in a single solution, rather than having to have the two IDEs open separately?
|
|
|
|
|
I'm fine for now. I've just downloaded a nice substitute of Visual C# - SharpDevelop, and I can use it to make Visual C# projects and solutions
|
|
|
|