|
So?
Regards,
Rob Philpott.
|
|
|
|
|
The answer is in the first line of your post:
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)"
|
|
|
|
|
Now dumping the stack trace won't help. What were you trying to do?
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas.
Carl von Clausewitz
Source
|
|
|
|
|
I have a c# program and want to connect it to remote sql server (sql server on another machine)
and i need help with the connection string inside the c# program.
|
|
|
|
|
|
|
You will get it from visual studio itself.
|
|
|
|
|
I want to write a small code in c# using Fuzzy Logic framework where user will give input number between 0 to 10 and that numbers needs to be classified as Low, Moderate and High. Low is 0 to 3, Moderate is 3 to 7 and High is between 6 to 10. Using triangular membership function. Any guess how to do it I read some tutorials on Fuzzy Framework but couldn't get my problem fit in those. Following is code I wrote,
class Program
{
static void Main(string[] args)
{
ContinuousDimension score = new ContinuousDimension("score", "score of word", "unit", 0, 10);
ContinuousSet low = new RightQuadraticSet(score, "Low Score", 0, 3, 4);
ContinuousSet high = new LeftQuadraticSet(score, "High Score", 6, 7, 10);
ContinuousSet mod = new BellSet(score, "Moderate Score", 5, 1, 2);
....
}
How should I proceed further now. I have assigned manually some score to opinion words(about 7000) on scale of 0 to 10 and I want to classify intensity of this opinion words as low, moderate or high using triangular function. Using fuzzy category of each word I have to further implement rules like if word1 is low and word2 is high then orientation is moderate .
|
|
|
|
|
|
I saw it initially, however had some questions.
1) How should be my dimension? Continuous or Discrete ?
2) How to define triangular membership function in C# fuzzy framework.
3) How I get member ship value of each element ?
4) How I define further rules ?
|
|
|
|
|
That link is to an article on CodeProject; if you have questions about it then you should post them in the forum at the end of the article.
|
|
|
|
|
hi,
I want to remove .net dependency of my c# project , So that i can rum my .Exe without . net framework .How an i do this thing.....Please help my uut regarding this asap....
|
|
|
|
|
Rewrite your code in a language that doesn't depend on .NET.
There is no way to remove the dependency without breaking things. There are some expensive commercial products out there that bundle .NET into your installer.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Understand what you are asking, you want to run a .Net application without the .Net framework.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Why do you want to do this?
C# and the .NET framework are not separate things, they overlap each other. You need the CLR to JIT and manage the execution of the code. Really not a good idea.
That said, I believe there is a product which can read in assemblies and pre-compile them to native code by bundling in its own version of the CLR. Can't remember what its called but Google around. I'd expect it to be expensive, and probably not very reliable.
Regards,
Rob Philpott.
|
|
|
|
|
This is just silly. Do you even know what .Net and C# are?
|
|
|
|
|
OK, so scrap your code and rewrite it in C++. Oh, there's a runtime for that too. Well, depending on which version of C++ you use, you might find that the runtime for that is already installed, saving you the trouble. But, that's only IF it's already installed.
|
|
|
|
|
Hi, I have a small app that exposes a volatile singleton class in a class library. It is consumed by 2 applications that depend on it. Here is my intent: when I add an item to the collection in 1 program, I need the other program to see it. The other methods in this class that aren't included here are Save and Delete operations to the database that are called when I add or remove an item from the collection. My problem is that eventhough I stated the keyword volatile, the added item in the collection isn't shown in the collection in the other application.
Each viewmodel has a reference to the list it is contained in. When I want to save it, I add it to my list and the list saves it to my database.
So the way my app works:
- start app 1 that shows a list of viewmodels exposed by a "thread-safe" singleton class.
- start app 2 that adds a viewmodel to the list exposed by that same singleton class.
- list in app 1 is autmatically updated as it should be the same reference.
That last part apparantly isn't true when I test my code. Can you help me out ?
public class CursistDepository : ObservableCollection<CursistViewModel>, IPersonDepository<CursistViewModel>
{
private static volatile CursistDepository instance;
private static readonly object padlock = new object();
public static CursistDepository Instance
{
get
{
if (instance == null)
{
lock(padlock)
{
if(instance==null)
{
instance = new CursistDepository();
IEnumerable<ICursist> persons = Cursist.Select();
foreach (ICursist person in persons)
{
CursistViewModel model = new CursistViewModel(person);
instance.Add(model);
}
}
}
}
return instance;
}
}}
|
|
|
|
|
Each process gets it's own instance of the static variable; it's not shared across the AppDomain.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
After your post, I went to search on how to do it cross apdomain and came up with marshalbyrefobject. However the documentation I came across was limited. Here is what I tried: I made a wrapper class that inherits from marshalbyrefobject and has variables linking to my depository classes. That didn't really do the trick sadly. Does anyone have a reliable way to do this?
|
|
|
|
|
Nico Haegens wrote: That didn't really do the trick sadly Should work if both apps access the same AppDomain.
Nico Haegens wrote: Does anyone have a reliable way to do this? Do what exactly? Share data?
Try SQLite's in memory-database if the apps are on the same server. It's a lot friendlier then memory-mapped files.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Instead of a direct communication of your applications with the database, make them communicate with a serve which in turn communicates with the database. Now the server can raise an event when data of the database were changed. Your applications can subscribe to the events of the server, and update their local data.
|
|
|
|
|
That's pretty much what I was doing by seperating the database classes through viewmodels. Can you provide an example of your implementation?
|
|
|
|
|
The point is: you need an extra application as a server (a Windows Service is likely a good way to do that). For communication between server and client, you can use e.g. .Net Remoting; keep in mind that you'll need to communicate events from the server to the client - not all types of communication allow for that.
|
|
|
|
|
Two applications (two processes) run in completely separate spaces, static state (including singleton classes) aren't shared between processes. You need some cross-process communication to have two processes synchronise with the same data source.
What you need is a setup with not two applications but three: two client applications which talk to a service which contains all the database access, and fires events or sends messages when it's updated. Alternatively, you need to ask the database directly for updates (which may require polling, not sure if it's possible with triggers).
|
|
|
|