|
Sorry. You can't insert images into a question.
Upload the image elsewhere and post a link to it here.
|
|
|
|
|
Just to add to the others comments: You can't, for good reason. This is a work-friendly site, and we want to keep it that way, so the people in charge of corporate networks don't block the site. If that happened, a lot of us would be unable to access info here which is really useful to do our jobs. The problem is that once you allow direct image posting you have to moderate the forums as well: every single question has to be vetted to make sure that nothing inappropriate is posted - because there are enough morons out there who will and do post images to any site because it s "funny". It wouldn't take many of those pictures to start us onto a blacklist, so we would have to moderate each and every question, answer, comment, and message. We don't have the resources to do that; we are all volunteers, and that kind of thing takes time and slows the posting of questions and responses. It's also serious boring, and people don't generally volunteer for dull stuff.
So instead, all images are banned, and moderation can be a lot simpler - it can be as we do it now: after the fact.
Ok, that means the one question in a thousand which would be improved by a question suffers. But the other 999 get a good, timely response. And to be honest, if you need to show us a picture, you are probably asking the wrong question anyway...
|
|
|
|
|
Hi Guys,
Can you please help me on this one, i have this function that i use to get the value of a registry from a remote computer, this one works fine for string values but i could not get binary values using this method, even if i change the
registry.GetMethodParameters("GetStringValue")
registry.InvokeMethod("GetStringValue", inParams, Nothing)
with
registry.GetMethodParameters("GetBinaryValue")
registry.InvokeMethod("GetBinaryValue", inParams, Nothing)
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim servername As String = "192.168.71.127"
Dim options As ConnectionOptions = New ConnectionOptions()
With options
.Username = "Administrator"
.Password = "mypassword"
.Authority = "ntlmdomain:DOMAIN"
.Impersonation = ImpersonationLevel.Impersonate
.Authentication = AuthenticationLevel.PacketPrivacy
End With
Dim scope As ManagementScope = New ManagementScope("\\" & servername & "\root\default", options)
scope.Connect()
Dim registry As ManagementClass = New ManagementClass(scope, New ManagementPath("StdRegProv"), Nothing)
Dim inParams As ManagementBaseObject = registry.GetMethodParameters("GetStringValue")
inParams("sSubKeyName") = "Software\Microsoft\Windows NT\CurrentVersion"
inParams("sValueName") = "CurrentVersion"
Dim outParams As ManagementBaseObject = registry.InvokeMethod("GetStringValue", inParams, Nothing)
MessageBox.Show(outParams("sValue").ToString)
End Sub
IMO
|
|
|
|
|
This should probably be in the VB forum...
But, do you get any kind of error?
|
|
|
|
|
Hi its ok if you have a sulotion using C#, i can convert it, the return value is only 4 byte().
IMO
|
|
|
|
|
i want to create crystal report, and it dynamically create columns.because of i have more tables, when user select a table and click show report, then its show the corresponding report.and next time the user select another table so it shows the corresponding table..
Thanks & Regards
AR
|
|
|
|
|
Following google search string certainly seems to show how to add a column dynamically.
C# crystal reports how to add a column
|
|
|
|
|
i did't find so only ask..
Thanks & Regards
AR
|
|
|
|
|
Dear all,
I find out Facebook does a good way of handling photos:
1) You can add photos to an album at any time.
2) You can rearrange the order at any time.
3) You can add/modify description to the album at any time.
4) You can add/modify description to each photo at any time.
I want to have the same functionality available in my local computer. That means when I get into my album folder, maybe I click on a page or a program, it will allow me to do the above 4 things.
Usually I arrange my photos like this:
E drive
+ Photo 2012
+ Photo 2013
+-- 2013-01-01 New Years Day
+---+ Photo0107.jpg
+---+ Photo0108.jpg
+---+ Photo0109.jpg
...
+-- 2013-02-14 Romantic Dinner
+---+ CIMG0907.jpg
+---+ CIMG0908.jpg
+---+ CIMG0909.jpg
...
Please note that I want to keep it simple. I think Facebook is a web thing. It uses Ajax to handle the photos. I don't want to install a web server in my computer. Please provide any pointer, whether there is on the shelf product, whether this is achievable using C#, or have to use ASP.NET / Ajax / php / etc. Thanks.
|
|
|
|
|
You seem to be on a shopping exercise to get a desktop photo/image management system or are you going to try and build such a tool, you don't actually ask a question.
Have you attempted to search for such a program yourself, I would suggest Google may be of service for this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
how to create messagebox if save record success with sum record
exemple
string save=string.format("insert into quantity([input])values('{0}')",texbox1.tex);
sqlconection con new sqlconection();
con.open();
sqlcommend cmd = new sqlcommend();
cmd.excutenonQuery();
con.close();
i want to show message=> messagebox.show"(Rcord 10 Item ");
|
|
|
|
|
1 Your insert query is wrong
2 You are using unverified data directly from your user - look up Little Bobby tables
3 You have no output from sql to get the information
Personally I would build a parameterised stored procedure that insert/updates the record and returns the sum you are looking for. the result to be returned as either a single integer value using ExecuteScalar or as a table.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i want to show messagebox sum row/record with messagebox
private void bsave_Click(object sender, EventArgs e)
{
string save = string.Format("Insert into ShippingCompany([ShippingCompanyCode],[ShippingCompanyName],[CurenccyCode],[ActiveStatus],[CreateBy],[CreateDate],[modifiedBy],[modifiedDate])values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}')", t1.Text, t2.Text, t3.Text, t4.Text, t5.Text, DateTime.Now.ToString("yyyy-mm-DD" + "HH:mm:ss"), t7.Text, DateTime.Now.ToString("yyyy-mm-DD" + "HH:mm:ss"));
SqlConnection con = new SqlConnection(dikonek);
con.Open();
SqlCommand cmd = new SqlCommand(save, con);
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("?");
|
|
|
|
|
You did not understand my last answer, you obviously have no idea how to do database operations and you are making the most basic error by storing dates as text.
PLEASE get a book, work through the examples and then do some tutorials on the subject, you do not even have enough knowledge yet to as sensible questions.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
What Mycroft has stated is correct you shouldn't store dates in the database as strings but I wont go into that as he already has.
If you look at the ExecuteNonQuery[^] documentation you will see that the method returns a value indicating the number of rows effected.
you can then use this value in a string.
string Message = String.Format("Number of rows affected {0}", result);
MessageBox.Show(Message);
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Avoiding SQL Injection[^] isn't hard:
string save = "Insert into ShippingCompany ([ShippingCompanyCode], [ShippingCompanyName], [CurenccyCode], [ActiveStatus], [CreateBy], [CreateDate], [modifiedBy], [modifiedDate]) "
+ "values (@ShippingCompanyCode, @ShippingCompanyName, @CurenccyCode, @ActiveStatus, @CreateBy, @CreateDate, @modifiedBy, @modifiedDate)";
using (SqlConnection con = new SqlConnection(dikonek))
using (SqlCommand cmd = new SqlCommand(save, con))
{
cmd.Parameters.AddWithValue("@ShippingCompanyCode", t1.Text);
cmd.Parameters.AddWithValue("@ShippingCompanyName", t2.Text);
cmd.Parameters.AddWithValue("@CurenccyCode", t3.Text);
cmd.Parameters.AddWithValue("@ActiveStatus", t4.Text);
cmd.Parameters.AddWithValue("@CreateBy", t5.Text);
cmd.Parameters.AddWithValue("@CreateDate", DateTime.Now);
cmd.Parameters.AddWithValue("@modifiedBy", t7.Text);
cmd.Parameters.AddWithValue("@modifiedDate", DateTime.Now);
con.Open();
int rowsAffected = cmd.ExecuteNonQuery();
MessageBox.Show(string.Format("{0} rows affected.", rowsAffected));
}
You should also consider giving your controls more meaningful names than t1 , t2 , etc.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I am trying the following code to create a new XML document but getting the above error.
could you please help..
xml_document = new XDocument();
xml_document.Declaration = new XDeclaration("1.0", "utf-8", "true");
xml_document.Add(new XElement("EventLog"));
XElement event_node = new XElement("Event", new XAttribute("ID", Guid.NewGuid().ToString()));
XElement event_date = new XElement("DateTime", DateTime.UtcNow.ToString("ddd dd MMM yyyy HH:mm:ss"));
XElement event_details = new XElement("Description", event_description);
event_node.Add(event_date);
event_node.Add(event_details);
xml_document.Add(event_node);
xml_document.Save("eventlog.xml");
Technology News @ www.JassimRahma.com
|
|
|
|
|
Shouldn't event_node be added to the root "EventLog " node?
/ravi
|
|
|
|
|
Exactly! OP is trying to add more than one root node to a document which is of course nonsense.
Regards,
— Manfred
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
How can I fix it?
My xml structure is like this:
<eventlog>
<event id="[GUID]">
<datetime><datetime
>
<description><description>
<event>
<eventlog>
Technology News @ www.JassimRahma.com
|
|
|
|
|
Empty structures are the best!
I guess something went wrong there?
|
|
|
|
|
As Ravi said, you need to add the event_node to the root node, not the document:
xml_document.Root.Add(event_node);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
See my reply here[^].
/ravi
|
|
|
|
|
Try this:
xml_document = new XDocument();
xml_document.Declaration = new XDeclaration("1.0", "utf-8", "true");
XElement rootEle = new XElement("EventLog")
xml_document.Add(rootEle);
XElement event_node = new XElement("Event", new XAttribute("ID", Guid.NewGuid().ToString()));
XElement event_date = new XElement("DateTime", DateTime.UtcNow.ToString("ddd dd MMM yyyy HH:mm:ss"));
XElement event_details = new XElement("Description", event_description);
event_node.Add(event_date);
event_node.Add(event_details);
rootEle.Add(event_node);
xml_document.Save("eventlog.xml");
/ravi
|
|
|
|
|
Thanks Ravi. It solved my problem.
Technology News @ www.JassimRahma.com
|
|
|
|
|