|
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)
|
|
|
|
|
|
daffy_2003 wrote: Hi. I just join this community.
Weclome. You may want to read the posting guidelines. 'can anyone help me' does not make a good subject, it doesn't tell anyone what you want.
What tools did the person who asked you to do this task provide ?
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
|
|
|
|
|
Christian Graus wrote: What tools did the person who asked you to do this task provide ?
A course syllabus given six weeks ago with the assignment due next week.
only two letters away from being an asset
|
|
|
|
|
Well, I doubt that a course would tell him/her to write code to export to PDF. It sounds more like a rentacoder job gone wrong. If it's a paid job, if he's an employee, then he should run for his life. Either way, if he's new to C#, and has paid work to do this task, it's plain wrong, and it's everything that's wrong with our industry today. But, if he's not the one taking the freelancing work, then he's working for people who are also clueless.
Either way, I was trying to get a feel for his situation before explaining that he needs a PDF library, and to either tell his client to find someone who knows what they are doing, or if he's part of a team, to get out of there as soon as he can.
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
|
|
|
|
|
Damn - I thought I was as polite as I could possibly be. He still deleted his post.
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
|
|
|
|
|
Hi, is this better compare to the previous one?
The person did not tell me what tools to use except for C# but for the merging of pdf, he said try using iTextSharp.
|
|
|
|
|
OK, so at least they've told you what library to use. I'm confused then why you asked us without saying you wanted to use that library. It bothers me that there are people who are told by their supervisors to do tasks they obviously have no idea how to do, and then sent to try to get someone on the web to do the task for them. If you're new to C#, then you should certainly learn that before you start writing code that people will use, or trying to work with third party libraries. In any case, the documentation for iTextSharp is your best bet, followed by any forums they have. Only because, everyone there USES iTextSharp, and will therefore be able to help you. Some people here may use it, but you sure want to put iTextSharp in your header, and generally explain that's what you're using.
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
|
|
|
|
|
Im sorry if i did not mention about it. I just wanna see is there any suggestion to it and not trying to get someone to do the task.
But still, thanks for your advice.
|
|
|
|