|
This all comes down to the security on the pc's themself.
If access is blocked on them there is no way for your program to access them.
You can't overwrite the security.
Admin account does have some more rights but still need to obey the security rules set by that pc (or domain)
|
|
|
|
|
I already have domain admin rights. so I dont think that is the issue. I have looked around on the net quite a bit and everything that comes up mentions the mapped or shared drives.
All the PCs have a C$ share which I have tried aswell but that doesnt seem to work either. I think the problem is with my addressing the PC. I have tried using the IP address and the DNS name. Both dont work.
The alternate is to programatically map the drive the run run this part of the code the unmap the drive but I dont know how I would do that and running for that many PCs may cause performance faults on the pc that is running the program.
|
|
|
|
|
paolo.gigante wrote: I already have domain admin rights
paolo.gigante wrote: All the PCs have a C$ share
It should work then but you have to use:
\\pcname(or ip)\c$\...
for the c$ share.
|
|
|
|
|
paolo.gigante wrote: string Slashes = @"\\";
string NetPath = "PCName";
string path = Slashes + NetPath + "\\c:\\temp\\Test.txt";
try
string Slashes = @"\\";
string NetPath = "PCName";
string path = Slashes + NetPath + @"\C$\temp\Test.txt";
or
string NetPath = "PCName";
string path = @"\\"; + NetPath + @"\C$\temp\Test.txt";
use "C$" instead of "C:".
|
|
|
|
|
Hi I have the folowing code for creating an sql query
string cmdText = "";
if (machines.Count > 0)
{
cmdText = @" AND CHECKINOUT.SENSORID IN ( ";
int counter = 0;
foreach (int itemId in machines)
{
cmdText += "\"" + itemId.ToString() + "\"";
if (counter != machines.Count)
{
cmdText += ",";
}
counter ++;
}
cmdText += ")";
}
The \" is not working. I want to have a sort of display like ("1","2") but I am having (\"1",\"2"). Can someone help me please?
|
|
|
|
|
All you need is "" .
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
I'm more concerned that you're doing two things that are obviously wrong here.
1. You are using string for concatenation. Take a look at using StringBuilder instead.
2. There is a limit to how many items can appear in an IN clause. The limit varies from database to database, but whenever I see this architecture I shudder. It shows you're either naive about performance enhancements in the database, or lazy.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi,
on top of what the other chaps already said:
1.
how did you establish there are backslashes present? don't trust the Visual Studio watch windows, the only thing you should really trust is your own code: try Console.WriteLine(cmdText)
2.
if SENSORID is a numeric field, the values don't need any double quotes; with quotes you turn them into strings.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
modified on Friday, June 12, 2009 10:01 AM
|
|
|
|
|
Hi Experts
When i run Any Query in SQL Server Message Tab Show Me Message in Text Format or Any Error show Me in Text Format or any Other Result i get all These Message That is Return by Back End (SQL Server) on Front End Either These Are Message or Error
i get All these in C#.NET(Front End )
when i run Query select then sql server give me message 10 rows effects.
when i run query insert then sql server give me message 10 row delete
when i run BCP Command the sql server give me message 10 rows Copies,20 rows Copies,
30 rows Copies ... so on
all these message i get in C#.NET after run of query from front end in C#.NET
Acutully i am Running BCP Command From DOS using Batch File When I Run It
it Give 100 rows successfully bulk -copied to host file total received :100
it Give 200 rows successfully bulk -copied to host file total received :200
it Give 300 rows successfully bulk -copied to host file total received :300
it Give 400 rows successfully bulk -copied to host file total received :400
---- and So on
i redirect these message in Front End in C#.NEt
Thank U
Dinesh Sharma
modified on Friday, June 12, 2009 5:57 AM
|
|
|
|
|
And yor question is?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
This makes absolutely no sense.
Explain your problem (if you have any) better please.
Sharma Dinesh Kumar wrote: Thank U
Your welcome
|
|
|
|
|
Try running the command SET NOCOUNT ON before you run your command. If you are developing against stored procedures, ensure that you've set it at the top of your stored procedure.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
LOL - it took me about 10 minutes to go to the other computer and find a proc to remind myself of what the command was ( it's over a year since I last wrote any SQL )
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I'm not sure why these show up in your front end, but you can actually turn them off. The command is SET NOCOUNT ON
And I agree with the others, it's really hard to work out what you're trying to say here, and there's no actual question that I can see
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
In one of our applications we have one or more resources embedded in an assembly.
I get the resource names using assemblyName.GetManifestResourceNames().
Is there a way to find if a string key is defined in either resource file?
If I know the file then I can get the localized string using ResourceManager.GetString using the string key.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
when an adobe file is opened in IE, the adobe file is obtained in temporary internet files,
sometimes, if adobe file that is displayed on IE is of 250kb file, and the file which is obtained in 10kb and the remaining is obtained in temp folder with filename.tmp extension.
The question is who makes .tmp file which is made in TEMP folder, is it IE or Adobe Reader?
How/where can I get the Full file which is displayed on IE.
|
|
|
|
|
And this is related to C# how?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hi all,
I want to raise an event with delegates
my code is like this:
delcaration:
public delegate void ButtonClickedDelegate(string path);
public event ButtonClickedDelegate ButtonClicked;
call:
GetData(path);
raise:
private void GetData(string path)
{
try
{
if (ButtonClicked!= null)
ButtonClicked(path);
}
catch
{
}
}
But I am getting ButtonClicked = null
at the line
if (ButtonClicked!= null)
so that
ButtonClicked(path);
is not getting executed....
Do anybody have idea what is the wrong with the code?
|
|
|
|
|
That's because you've just declared a event handler, not created it.
try something like:
ButtonClicked += new System.EventHandler(GetData);
regards
|
|
|
|
|
Hi,
you need to wire a handler to your event, as in ButtonClicked += new ButtonClickedDelegate(handler);
Compare with what Visual Designer adds to myForm.designer.cs when you wire a handler interactively.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Getting 'System.StackOverflowException'
at line
void OnButtonClicked()
{}
when I do
ButtonClicked += OnButtonClicked;
...
void OnButtonClicked(...) {
...
}
|
|
|
|
|
Let me guess: in the OnButtonClicked code, you are raising the ButtonClicked event?
If yes, doing so casue the OnButtonClicked code to be recursively called non-stop, quickly filling the avaliable stack memory.
In your OnButtonClicked, you have to put logic to handle the event, not to raise it.
|
|
|
|
|
Where is the handler to the event?
Guess you are missing that.
|
|
|
|
|
ButtonClicked will be null if there are no subscribers to the event (therefore the delegate's InvocationList is empty).
This example shows you how to do it. The ButtonClicked event here is initiated by the public PerformButtonClicked method being called on a class instance and in turn calling the OnButtonClicked method, but obviously in the real world the OnButtonClicked method would be called by the instance itself on response to a MouseDown or something.
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
TestClass test;
public Form1()
{
InitializeComponent();
test = new TestClass();
test.ButtonClicked += new TestClass.ButtonClickedDelegate(test_ButtonClicked);
test.PerformButtonClicked(@"C:\Windows");
}
void test_ButtonClicked(string path)
{
MessageBox.Show(path);
}
}
public class TestClass
{
public delegate void ButtonClickedDelegate(string path);
public event ButtonClickedDelegate ButtonClicked;
protected virtual void OnButtonClicked(string path)
{
ButtonClickedDelegate handler = ButtonClicked;
if (handler != null)
handler(path);
}
public void PerformButtonClicked(string path)
{
OnButtonClicked(path);
}
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|