|
cant you tell? it uses access database
im just a beginner at this c#.
|
|
|
|
|
dear friends,
I have problems dealing with adding records to the database using oledbcommandbuilder here is my code which I get from www.homeandlearn.co.uk, its a tutorial site.
the error say error in Insert into sysntax...
this is my code...
<br />
<br />
System.Data.Oledb.OledbCommandBuilder cb;<br />
cb = new System.Data.Oledb.OledbCommandBuilder (da);<br />
<br />
DataRow drow = ds1.Table["login"].NewRow();
drow[0]=textbox1.Text;<br />
drow[1]=textbox2.text;<br />
<br />
ds1.Tables["login"].Rows.Add(drow);<br />
<br />
MaxRows = MaxRows + 1;<br />
inc = Maxrows - 1;<br />
<br />
da.Update(ds1,"login");<br />
<br />
this is for windows application..
thanks!!
ginji Amano
modified on Friday, June 13, 2008 3:56 AM
|
|
|
|
|
i want to add menu in master page, but i face a problem in menu. menu does not show in proper view
|
|
|
|
|
Hi,
i am using System.Net.FtpWebRequest class to do FTP operations. In my FTP folder after processing i need to move files into another folderwith in the same FTP
FTP ROOT
File 1
File 2
File 3
Archive
After downloaing the file i need to move file1 ... to Archive how to do it.
Thanks in advance
|
|
|
|
|
you have FTP User name and Password
|
|
|
|
|
Hi,
yes i have, how to do Move operation using FTPWebRequest class
|
|
|
|
|
hi,
Any update on the thread
regards
partha
|
|
|
|
|
Hi everyone
I want to get printer information using “Printer job description language “in c#.
My question is:
• How to send PJL command to USB connected and Lan connected printer in C#
I have installed “HP LaserJet 1300” printer which is running on “DOT4_001” port. Now I want to send PJL command to this printer and want to get information about printer.
If anybody has any sample project or article .Please send me
Regards
Rajesh
rajesh
modified on Friday, June 13, 2008 2:33 AM
|
|
|
|
|
I have a Following Interface.
public interface IToString
{
string MyString();
}
I have Implement that interface in the following class
public class Implementor : IToString
{
#region IToString Members
public string MyString()
{
return "Siva";
}
#endregion
}
In Another class i am calling the interface method Mystring()
My Question is..
Using the object instance we can directly call the method MyString
Like ..
Implementor dd = new Implementor();
MessageBox.Show(dd.MyString());
But Why we use interface instance and we call that method..
Like..
IToString Reference1 = new Implementor();
MessageBox.Show(Reference1.MyString());
What is advantage using interface here?
public partial class Form1 : Form
{
private void button1_Click(object sender, EventArgs e)
{
IToString Reference1 = new Implementor();
MessageBox.Show(Reference1.MyString());
Implementor dd = new Implementor();
MessageBox.Show(dd.MyString());
}
|
|
|
|
|
sivakumar19 wrote: What is advantage using interface here?
None, until you have a completely unrelated class, which you want to share the common interface. You can't have one reference point to two totally different classes, but you can have a reference to the part of those classes that is defined by the common interface.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank You..
I have understand that one..
If there is any other advantages ?? please let me know..
Thanks a Lot...
|
|
|
|
|
No, none.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
Is it possible to get the current function or property name using reflection? If it is then how?
Regards
Shajeel
|
|
|
|
|
string name = System.Reflection.MethodBase.GetCurrentMethod ().Name;
|
|
|
|
|
any thing similar for property?
Regards
Shajeel
|
|
|
|
|
Its the same..
Properties are methods in IL code.
However , you will have to remove "set_" and "get_" prefixes that are applied to property methods.
eg if you have a property called "Foo" and you use the code I supplied in the "setter"
you will get "set_Foo"
and in the getter you will get "get_Foo"
|
|
|
|
|
|
I need to find all of the unused public members in my solution.
I have found one tool - NDepend - that will do this.
I am currently evaluating Resharper and I cannot tell if Resharper has this functionality.
Does anyone here know if Resharper can be used to find unused public members? If so then how?
|
|
|
|
|
The IDE does that for you, no need to buy anything. Just check your warnings
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
No - I think the VS IDE only finds unused private members.
You should be able to set up a simple example in your dev environment to validate that the VS IDE does not identiry unused public members.
Even 3rd party tools like FXCop only find unused private members.
The only tool that I've found that finds unused public members is NDepend through the use of CQL.
If you can show me a test case where VS identifies unused public members then please post it here.
|
|
|
|
|
Just because it's unused today doesn't mean it will be unused tomorrow.
|
|
|
|
|
ROTFL !! well said
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
No. It would be impossible to tell for sure - the member might be used in a different solution.
Things you make public/protected are generally things you have to support. I'd be mighty annoyed if MS started dropping public members from stuff I use because they don't use it in house
|
|
|
|
|
I am attempting to create an application which hooks input and output of a console application (usually cmd.exe) running in a Process object, and render the output in a custom fashion. So far it works great (Check out http://tom.net.nz/consolewrapper/ if you're curious ) but difficulties are arising with passing through commonly used console keystrokes, such as TAB or Ctrl-C. The streams happily handle basic strings of course, but don't like advanced keys so much.
The Process is started as such:
<br />
_process = new Process();<br />
_process.StartInfo.FileName = appName;<br />
_process.StartInfo.UseShellExecute = false;<br />
_process.StartInfo.RedirectStandardError = true;<br />
_process.StartInfo.RedirectStandardInput = true;<br />
_process.StartInfo.RedirectStandardOutput = true;<br />
_process.StartInfo.CreateNoWindow = true;<br />
<br />
_process.Start();<br />
<br />
_stderr = _process.StandardError;<br />
_stdout = _process.StandardOutput;<br />
_stdin = _process.StandardInput;
I have tried using SendKeys, but since the process has no window, it seems to send the keys directly back to my interface, causing a rather nasty feedback loop. There also seems to be no dice on passing keystrokes to a Stream.
I would really hate to have to re-invent the wheel on TAB completion etc! Any help or ideas appreciated!
|
|
|
|
|
I have created a class file and added a boolean value that's accessible for ALL the methods. The boolean is set to "bool IsLoggedIn;" when I execute the login method everything is fine and the bool gets set to true. when I execute method 2 the boolean is back to false!!
How can i retain the value in the boolean and use it over more than one method in that class?
Thanks!
Illegal Operation
|
|
|
|