|
I agree with having the service doing the pinging and writing to the database -- I've done that in the past. Just be sure it runs under a user which has access to what it needs. I believe it's best to have a user which is created specifically for running the service and accessing the database.
I also put the service's configuration (e.g. how frequently to cycle) in the database and have it retrieve the configuration on each cycle. This allows me to alter the configuration without stopping the service.
|
|
|
|
|
Hi,
its a desktop application in c#..i have to play multiple videos in media player..for which i have to create playlist in c#...can anyone help me how to create playlist in c# to play multiple videos in windows media player..
Regards
Tanzeel...
|
|
|
|
|
media player sample play list
<?wpl version="1.0"?>
<smil>
<head>
<meta name="Generator" content="Microsoft Windows Media Player -- 9.0.0.3250"/>
<author/>
<title>JALSA</title>
</head>
<body>
<seq>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\05 - Jennifer Lopez.mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\06 - Gaallo Thelinattunde.mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\07 - Chalore Chalore Chal (Hindi).mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\08 - My Heart is Beeting (Remix).mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\09 - Jalsa (The Devi Mix).mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\10 - Importance of Blood Donation.mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\01 - Jalsa.mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\02 - My Heart is Beeting.mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\03 - You & I.mp3"/>
<media src="E:\Old Drive Data\Rajesh IMP\entertainment\Jalsa\Jalsa\04 - Chalore Chalore Chal.mp3"/>
</seq>
</body>
</smil>
thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
its desktop application in c#...not asp.net
|
|
|
|
|
That's not ASP.NET code; What you are looking at is the file-format, which is loosely based on XML. Write your data in the same format and MP will be able to read it.
I are Troll
|
|
|
|
|
Take a look at Create a Windows Media Player List[^] from here on Code Project.
Remember, Google/Bing is your friend!
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.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
Shall we replace all the Hash tables with Dictionary?? Other than boxing-unboxing any other difference between these two?
My small attempt...
|
|
|
|
|
Have a look at This[^], You'll get your answer.
|
|
|
|
|
i could not find the answer for my question with your 'google assist'. Please check your search and let me know whether is saying the answer for my question
My small attempt...
|
|
|
|
|
sujithkumarsl wrote: i could not find the answer for my question with your 'google assist'. Please check your search and let me know whether is saying the answer for my question
That's a bit rude, dude. Yeah, it's monday again
Anyway, to answer your question; both Hashtable and Dictionary are present in the framework. If one could replace the other, wouldn't they just "drop" one? There's some subtle differences between the two, and even though the behave similar, they're not exactly the same.
So, it's no good to replace all traffic-signs, you'd have to go down to the street and judge the situation at hand.
I are Troll
|
|
|
|
|
we should not encourage unnecessary replies, that why i did it...
Yes you got my correct question.. Now I want to know in what situation I can not replace Hashtable with Dictionary. Please put some more lights
My small attempt...
|
|
|
|
|
i think i got it finally
Here it is
My small attempt...
|
|
|
|
|
That's a nice explanation, thanks for the link
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: That's a bit rude
He was only responding to the rudeness of nagendrathecoder.
|
|
|
|
|
PIEBALDconsult wrote: He was only responding to the rudeness of nagendrathecoder.
You're right. I don't know why I fell over this particular post, must have been the phrasing or the mondays.
FWIW, I don't like the "just Google it"-answers either, but I have to admit that those links have helped me once or twice - just by having the correct searchterm.
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: just by having the correct searchterm.
Absolutely, some times you don't know the proper terms to ask for. But that doesn't seem to be the case here, it looks like the poster had already read a bunch of such articles, but was looking for more.
|
|
|
|
|
What is the latest C# version? is it same as the .net version number??
ie C# comes with .net4.0 is C#4.0. Is it like that?
My small attempt...
|
|
|
|
|
Latest version of c# is 4.0.
Yes, you are right, c# 4.0 comes with Visual Studio 2010 (.Net Framework 4.0).
|
|
|
|
|
sujithkumarsl wrote: Is it like that?
For .Net 4.0 this is the case i.e. C# 4.0 comes with .Net 4.0. The CLR for this has also been given the version number 4.0.
However, C# 3.0 worked on CLR 2.0 and Framework 3.5.
So version numbers need not necessarily be same.
|
|
|
|
|
Thank you for the answers.... It was an interview question... i said the latest is C#4.0 but he was not convinced
My small attempt...
|
|
|
|
|
I'm relatively new to using DataSets and DataAdapters so I have a few questions...
Can someone explain to me exactly what the TableMappings property does in a DataAdapter? The MSDN doesn't quite explain it well enough for me.
If I have a dataset filled with a subset of data from a given table, can I call fill again on that same dataset to pull in more data from that same table? If so, can I just use the fill function again in the same way with a different command or what?
Thanks,
Sam.
|
|
|
|
|
Nevermind... I figured it out.
|
|
|
|
|
Good Afternoon,
I posted this in General Databases earlier, but am not sure if is instead a C# problem since I am actually writing an application, so I am posting it here as well.
I used a nice SQL insert/update program for years with MSSQL 2000, but was never able to get it past security to make it work with 2005. This weekend, out of frustration, I decided to take a shot at writing one of my own. In doing so, I attempted to list the databases that were on the server. I first tested the command in the Query analyzer and it worked fine, returning all the names of the databases. However, when I tried to use the exact same code in the application, every database name comes up as "master" in the array, so I cannot continue to propagate the tables without a named database. I cannot understand how the identical code can return different results in different places. Here is the code.
Appreciate your assistance....Thank you, Pat
string Sql = "SELECT name FROM sys.databases";
SqlCommand Comm = new SqlCommand(Sql, Conn);
SqlDataAdapter da = new SqlDataAdapter(Comm);
DataSet ds = new DataSet();
da.Fill(ds);
int cnt = ds.Tables[0].Rows.Count;
string[] dbs = new string[cnt];
for(int i = 0; i < cnt; i++)
{
dbs[i] = ds.Tables[0].Rows[0]["name"].ToString();
}
foreach(string s in dbs)
{
databases.Items.Add(s);
}
|
|
|
|
|
You may want to consider using SMO for this kind of stuff - see this[^] article.
/ravi
|
|
|
|
|
Ravi..thank you for answering my question. I did get that code to work, but I had to add another reference. Although it finally did work, there was a different problem, but before I could finish it, I (actually one of you guys) found the error in the original code...simply replacing the string Rows[0] with Rows[i] fixed everything. I cannot believe I did not notice that! I am going to work on the other solution though, just in case I need to use at another time. Thank you again for your suggestion. Your time is appreciated! Best Regards, Pat
|
|
|
|