|
I don't see a query string in oleDbCommand1 . That might be your problem... Or is the query in the Properties somewheres?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
SELECT * FROM Customers...This query for OleDBCommand1 is actually embedded in the properties
|
|
|
|
|
I know this might be silly, but is there data in the table?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
yeah..there is data in the Access Database
|
|
|
|
|
I want to hide the tree in the report viewer
merwa
|
|
|
|
|
go to the properties section of Crystal Report viewer and enable
displaygrouptree to false
|
|
|
|
|
go to property window and set displaygrouptrees to false
|
|
|
|
|
Hello,
Does anyone have the code to make a timer count up on a label? I think it has something to do with 'parse', but I'm not sure...
thanks, now MS
|
|
|
|
|
Hi , Did you mean This ?
public int x;<br />
<br />
private void Form1_Load(object sender, System.EventArgs e)<br />
{<br />
x = 0;<br />
timer1.Enabled = true;<br />
timer1.Interval = 1000;<br />
}<br />
<br />
private void timer1_Tick(object sender, System.EventArgs e)<br />
{<br />
x++;<br />
label1.Text = x.ToString();<br />
}<br />
I know nothing , I know nothing
|
|
|
|
|
Hang on I'll give it a shot... If it's that simple...
|
|
|
|
|
HOW IS IT THAT SIMPLE??? THANKYOU, BUT LORD!! i LOOKED ALL over the freakin web and found hard stuff, and then there's this... I've benn looking a while now, so thankyou so much!
MasterSharp (not REALLY a master...)
|
|
|
|
|
I have network access to machines on the domain via remote desktop connection. I am trying to see if there is a way using C# to write an application that allows me to logon to the machine in such a way that it would allow me to check if a process is in memory.
Essentially I am trying to automate the process of checking to see if an executable that is supposed to be running is in fact running on 20 or so different machines without having to use Remote Desktop to login and physically inspect them.
Can someone point me in the right direction if it is possible?
|
|
|
|
|
You can use the Process.GetProcesses()[^] method. This method will use the same credentials as the user than runs your C# application. This user would need to have permissions to list processes on the remote box. In addition, there's a problem[^] with listing processes on certian windows boxes.
You can impersonate another user in C# as described here[^].
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
That's cool. I didn't know Process.GetProcesses could get the processes of a remote machine. I thought it was limited to where the exe was run from. "The More You Know..."
|
|
|
|
|
Hi there, I'm a new bie to C# still learning about it. Everything that i've read about the SET and GET method, I don't seem to understand and understand the purpose of its use and when to use it in an application. I was wondering if some one could help me. Any sample code that I've downloaded using this method so I can debug through it to hopefully understand dosen't work. I'm using .net framework 2.0. I've got some of the following code below that i've adapted to test it. I have a web form with a button and label on it when you click on the button :
DEFAULT.ASPX
protected void Button1_Click(object sender, EventArgs e)
{
int i;
prop iage = new prop();
iage.age = 5;
Label1.Text = iage.age;
}
PROP.CS
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
///
/// Summary description for properties
///
public class prop
{
public prop()
{
//
// TODO: Add constructor logic here
//
}
private int age = 0
public int age
{
get
{
return age;
}
set
{
age = value;
}
}
Thankyou
|
|
|
|
|
You can't give the private variable age the same name as the public property age. Consider renaming your private variable to something like _age.
You would have seen this error returned by the compiler though, right?
Regards
Paul
|
|
|
|
|
pmarfleet wrote: Consider renaming your private variable to something like _age.
Consider also sticking to the Microsoft guidelines that say that public properties use Pascal naming convention while private fields use camel case.
|
|
|
|
|
Thankyou Paul, i did get an error stating that your using the property name more than once.
|
|
|
|
|
get/set methods are called properties. They are syntactic sugar to allow you to hide the details of members, and provide the equivalents of methods to retrieve or set the value of those methods. So, what do I mean by this? Well you could view each get/set property as really being two methods; one is set_property and the other one is get_property.
Why would you do this? Well - properties allow you to encapsulate/hide members. Instead of providing you with direct access to the members, properties abstract your access. This means that you can leave implementation details for working with the members. For instance, suppose that you want to ensure that a string is of a certain length then you can do this like:
private string _myString;
public string MyString
{
get { return _myString ; }
set
{
if (value != null && value.Trim().Length > 30)
value = value.Substring(0, 30);
_myString = value;
}
}
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thankyou Pete, that is really helpful. So if we use your example above i believe instead of having the if statement in the back of the web form where it can be accessed by anyone and needed to be rewritten for other similar cases we know lock down the access to the data and also reduces the amount of redundant code. Have I correctly understood the purpose of this.
Thankyou
|
|
|
|
|
You have - although it offers more. Suppose that you want to change the length that is allowed - instead of having to search through every piece of code that calls this and change the length there, you can do it in one place here. Also, you can create a simple "dirty" check by doing:
public class MyClass
{
private string _myString = string.Empty;
private int _myInt = 0;
private bool _isDirty = false;
public string MyString
{
get { return _myString ; }
set
{
if (_myString != value)
{
_myString = value;
_isDirty = true;
}
}
}
public int MyInt
{
get { return _myInt; }
set
{
if (_myInt != value)
{
_myInt = value;
_isDirty = true;
}
}
}
public bool IsDirty
{
get { return _isDirty; }
}
public void Save()
{
_isDirty = false;
}
} This is only one example of the type of thing that you can do with properties.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Dataset should be saved to the SQL Database.
Am trying to do this using the Application Blocks.
I have downloaded it and am trying to use the SQLHelper class.
Can you tell me if this is a good practice?
How else can I push my dataset into the SQL database. I want to save the entire dataset in a Save_button click and not row by row.
Just a suggestion is enough. I know there are different means to do this but I want to know what is the practice that is generally carried on.
Some advice would really help.
Thanks
____________________________________________________________________________________________________________________________________________________________
"Always forgive your enemies - nothing annoys them so much."
-- modified at 15:15 Monday 24th September, 2007
|
|
|
|
|
You could serialize the contents of your DataSet to XML and write a stored procedure that uses SQLXML to import the contents of the XML document in one go.
For more information about SQLXML, follow this link[^].
Regards
Paul
|
|
|
|
|
Recently i came here to discuss the issue, how to secure files (pdf), the recomendation was httphandelers, it works absolutely great.But now an new issue has been arrived.
What i did , i registerd ISAPI extension (.pdf) in IIS 6.0,to let process the request to ASP.Net runtime, there i used context.response.transmitfile to send the file to the browser, as client will be viewing file in browser not downloading, but in case when file is bigger than 20 MB ,(file can be upto 100MB), it takes time, obviously it should take.
But when we redirect or request pdf file without registering ISAPI extension, browser starts showing file, means you see instantly first page or few pages while other are downloading, how to achive this kind of performance, and this kind of behaviour, with letting asp.net runtime process the request.
I hope you guys get my question & if any explaination needed please ask.
Note: Same issue with uploading files with .Net uploader control, even after we change machine.config file size attribute, i want suggestion about better performance, when many users are doing both uploading, and viewing files from repository.
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|
|
Hi everyone,
Could anyone kindly assist with some codes (preferably C#, Java) for the Travelling Salesman Problem that uses any of the following Heuristics
1. Tabu Search
2. Hill Climbing
3. GRASP (Greedy Randomized Adaptive Search Procedure)
4. Simulated Annealing
I need this to just text some problems.
Thanks
laremtj
Jesus Loves You, Give your Heart to Him Today
|
|
|
|