|
i am taking help from this article
C# RangeBar control[^]
it shows the range but i want one more thumb to show actual position.
|
|
|
|
|
That article is 14 years old so it is unlikely you will get a response from the writer. You will need to work it out from the article details and code.
|
|
|
|
|
Hi,
c# application is connecting to oracle database with oledb connection.In the windows form when the user getting data from oracle database data should be encrypted in the network.How can we implement this with odp.net.
select query into data reader and then datatable.
DataTable DT = new DataTable();
DT.Load(myOleDbDataReader1);
Grid.DataSource = DT;
|
|
|
|
|
For SQL Server, that would be set as an option in the connectionstring (see MSDN[^]); I'm not sure how Oracle would handle similar. You'd be googling for "TLS Oracle connection".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I need to create a crystal report and have to set Datasource location pointing to Development, Testing and Production servers. The created crystal report will be placed in database table and fetched at the time of reposrt generation by passing the credentials(Development or production).
Please help me in this, I need a crystal report generated with multiple datasource connection.
In C# I have written code as shown below:
oReport.SetDatabaseLogon(gcUser, gcPassword, gcDB, gcDB);
oReport.DataSourceConnections[0].SetLogon(gcUser, gcPassword);
|
|
|
|
|
I have no experience with Crystal Reports; but most applications will only accept a single datasource. A simple workaround is possible if you have MS Access installed; create a new Access database, and in that database, create a linked table. SQL Server can also do this trick.
The basic idea is that one would build the report on the single datasource (Access or SQL) that fetches their data from linked tables (that be pointing to your other datasources).
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Pretty sure that a report accepts multiple datasources.
|
|
|
|
|
One would expect that, yes
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Ajay_Chaitanya wrote: I need a crystal report generated with multiple datasource connection.
Not based on what you said you don't.
What you have is one datasource which needs to point to actual different sources based on the install.
The most obvious and easiest way to do that would be if all of the datasources had the same name. Which realistically they should.
If that isn't the case then you are going to need to provide a configuration that MUST be set when it is installed. However if reports already exist using the same database then the configuration would already exist so you would just need to find it.
I would suspect, strongly, that the Crystal reports API already has a way to support this. Probably via something like a named source.
But other than that .Net apps have many configuration options. So you could use one of those. If you are using that then you need to look at the process (which is not code) of installing the application on the target machine, to validate that it will get set correctly.
If it was me I would also add a check that insures that
1. The datasource properties are set (configuration)
2. The datasource is accessible.
That would be OUTSIDE of crystal and would use normal .Net access to the database. All it needs to do is a simple query (need not return anything.) That insures that access is set and that the app has correct permissions to access it.
|
|
|
|
|
Multiple databases are really outside the scope of what CR is meant to do. That said, your best bet is to build and hydrate an object outside of Crystal Reports and set that as the datasource for the report.
There are a lot of answers on the net about how to do this, just search for something along the lines of "Bind Crystal Report to object".
|
|
|
|
|
just from this url https://www.hanselman.com/blog/ExperimentsInOpenSourceExploringVcrsharpForHttpRecordAndPlayback.aspx
i came to know there is a library which people may use to code bench marking but i do not understand what is code bench marking and when to use it?
what kind of output and benefit i can expect from code bench marking ?
[Benchmark]
public async Task ReadFromCache()
{
using (var httpClient = HttpClientFactory.WithCassette("example-test"))
{
var request = new HttpRequestMessage(HttpMethod.Get, "http://www.iana.org/domains/reserved");
var response = await httpClient.SendAsync(request);
}
}
Output:
Method | Mean | Error | StdDev |
-------------- |---------:|---------:|---------:|
ReadFromCache | 684.1 us | 3.154 us | 2.796 us |
when i see the output just do not understand what it is showing........so anyone tell me what kind of output it is ?
where this output will be showing in console or debug window ?
please share the knowledge about code bench marking. thanks
|
|
|
|
|
Quote: I do not understand what is code bench marking and when to use it Benchmarking is measuring the time for a specific task. Because the time may vary for multiple reasons, the measurement is repeated multiple times. These multiple measurements are then statistically analysed.
It is commonly used to compare results from different implementations and/or different hardware to find the fastest one. It is also used for marketing. Just have a look at CPU (AMD vs. Intel) and GPU (AMD vs. Nvidia) test reports.
Quote: what kind of output and benefit i can expect from code bench marking ? The ouput depends on the used benchmarking tool. In general it is some kind of speed index. The benefit can be selecting the best implementation for specific tasks and/or different platforms (e.g. running on different types of CPUs like x86 and ARM).
Quote: so anyone tell me what kind of output it is The results shown in your post are:
Mean
The average time (sum of all times divided by number of measurements) or the statistics mean. See Mean - Wikipedia[^].
Error
The Standard error - Wikipedia[^] (commonly for the mean value).
StdDev
The Standard deviation - Wikipedia[^].
Which values are shown here should be mentioned in the documentation for the benchmark.
Quote: where this output will be showing in console or debug window ? That depends on the used benchmark tool.
|
|
|
|
|
can you suggest any good free bench marking tool which i can use to measure various class function written in .net. thanks for good elaboration answer. have a nice day.
|
|
|
|
|
Visual Studio.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
which tool exist in VS IDE to benchmark code. which VS version you are talking about. i am using VS2013. thanks
|
|
|
|
|
Did you not read the blog post you linked to?
BenchmarkDotNet[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
[Benchmark]
public byte[] Sha256() => sha256.ComputeHash(data);
how to benchmark single line of code instead of whole function.......any idea?
because Benchmark attribute can i use for single line code inside function?
|
|
|
|
|
I added a resource file LocalizedTexts.resx to a project. The designer automatically added a class MyNamespace.LocalizedTexts to that project. Then I added a string resource MyResourceName to LocalizedTexts , and the designer created the static property internal static string MyResourceName in that class.
How can I get the full name of that property, i.e. MyNamespace.LocalizedTexts.MyResourceName , in a "compile-time" static way?
nameof(LocalizedTexts.MyResourceName) returns MyResourceName only, I could write nameof(MyNamespace)+"."+nameof(LocalizedTexts)+"."+nameof(MyResourceName) , but that looks like a WTF...
I need something compile time static because I'd like to use it with an Attribute .
Thanks for your hints.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
Bernhard Hiller wrote:
nameof(MyNamespace) + "." + nameof(LocalizedTexts) + "." + nameof(LocalizedTexts.MyResourceName)
I suspect that's the only option - unless you feel like writing a customised version of Roslyn to add a fullnameof operator.
The compiler will generate a single string constant, so you won't incur the cost of concatenating the strings at runtime.
If you didn't have the compile-time constant restriction, you could use string interpolation instead. But that possibly looks even worse:
$"{nameof(MyNamespace)}.{nameof(LocalizedTexts)}.{nameof(LocalizedTexts.MyResourceName)}"
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks for your answer. Since the attribute is under my control, I could modify it: I added a property for the ResourceType. Meant that I had to modify a few hundred places where it was used, but it works...
Strange that sometimes such "easy" ideas require such a lot of work-around.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
what is the benefit of delegets and how it is differ from Event and how it handled?
|
|
|
|
|
Delegates
Briefly, delegates are reference to method and they are important because they represent callback to your asynchronous operations i.e. events: you may never know when particular event encounters but you might want to handle it exactly once it's there
|
|
|
|
|
Events are Delegates as a very simple Google would have found you: delegets and how it is differ from Event - Google Search[^]
Follow a few of the links, read a few of the answers at SO and CP - if that doesn't clear it up for you, come back and explain exactly what you don't understand.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
can i use try catch finally in PHP?
|
|
|
|
|
This is the C# forum. Have you tried the PHP documentation?
|
|
|
|