|
deep7 wrote: but it gave error
It would help to know what the error was.
Here is an example of running SQL from a file[^]. It might help.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hi all, how i can connect my project to an help file 2.0 ? i want to open my help when i click f1.
Best Regards
|
|
|
|
|
hi how to extract code from exe file with System.reflection and how to compile it in runtime ?
|
|
|
|
|
hdv212 wrote: how to extract code from exe file with System.reflection
You cant.
|
|
|
|
|
When I Execute this code It giving some Error If There is any worng Plz make a correct and Fw me
Sending Code I declared One Parameter as a Output Param in My Stored Procedure, It is executes well, that checked in SQLSERVER
private void bt_submit_Click(object sender, System.EventArgs e)
{
string intres;
try
{
com.CommandText="proc_login";
com.CommandType=CommandType.StoredProcedure;
com.Connection=con;
if(con.State == ConnectionState.Closed){
con.Open();
}
SqlParameter param=new SqlParameter("@ret_val",SqlDbType.VarChar,5);
param.Direction = ParameterDirection.Output;
com.Parameters.Add("param");
com.Parameters.Add("@ln",txt_lname.Text);
com.Parameters.Add("@pw",txt_lpwd.Text);
com.ExecuteNonQuery();
intres = com.Parameters["@ret_val"].Value.ToString();
if(intres == "nex")
{
MessageBox.Show("record Inserted");
}
else
{
MessageBox.Show("Record Not Inserted");
}
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Balu
|
|
|
|
|
Balavardhan wrote: com.Parameters.Add("param");
You have given this parameter no value (so I'd imagine it would default to null).
Also, it is poor design to have the button click event handler communicate with the database. It would be better to refactor all the database interaction out into a specific class (or set of classes). That way, you can refactor further to create methods that do common tasks when interacting with the database.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I am trying to format datagrid data in C# using windows applications but i cannot get it right.I want to display something like this 4.20 but it gives me 4,2000 in my datagrid.
|
|
|
|
|
i think u want to display in 1000's, 10000's format of ur currency is it?... if its the case means u can't format it by datagrid format options u have to divide it by 1000 or 10000 like that only and then u can format the string by stringvalue.tostring("n2")
VMSSanthosh
|
|
|
|
|
hi! is there a way to allow a single file to be open multiple times? because in my C# application, there's always the error that states that the file can't be opened because it is already opened... thanks!
|
|
|
|
|
If a process has opened the file "exclusively" then other processes cannot access it. The file has to be opened in a shared mode for other files to be able to access it.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
How do i do it? Is there an existing code to set an opened file to shared mode?
|
|
|
|
|
Are there any built in framework classes in the .NET by which i can directly convert an integer value into its equivalent Hexadecimal form in C#.
|
|
|
|
|
int number = 1223445;
string hex = number.ToString("x");
//hex is "12ab15"
|
|
|
|
|
String.Format ("{0:X}", 12345678);
Or String.Format ("{0:X8}", 12345678). The "X8" will pad the number with 0s if there aren't 8 digits.
Jon Sagara
Look at him. He runs like a Welshman. Doesn't he run like a Welshman? Doesn't he? I think he runs like a Welshman.
Sagara.org | Blog | My Articles
|
|
|
|
|
Hi all,
I want to study some important/difficult concepts in .net.
like
1. .Net Remoting
2. XML programing using c#
3. Thread synchronization
4. Appdomain and memory concepts
5. inside CLR
if any one knows the good link for the above concepts please share with me.
i thought these are the most difficult/important concepts in .NET
If you have any more inputs please add it to the list.
Thanks and Regards,
Srini;)
|
|
|
|
|
engsrini wrote: 2. XML programing using c#
3. Thread synchronization
4. Appdomain and memory concepts
5. inside CLR
Read Tom Archer's "Inside C# 2 ed".
engsrini wrote: 1. .Net Remoting
Read Ingo Rammer's "Advanced .NET Remoting".
Cheers,
Simon
> blog:: brokenkeyboards
> what I think of the OPTIONAL keyword in VB.NET? :: here
> CV :: PDF
> skype :: SimonMStewart
|
|
|
|
|
Hello,
I am trying to find out a way to know that the user has changed value in NumericUpDown control by typing in it or by pressing the up or down buttons. Any suggestions about it?
Thanks in Advance.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
hi,
Value Changed Event is fired when you Click the Up or Down Button, you can do your calculations within that Event.
Also look for Leave Event of it, Compare the Previous value with New value and then you can customize ..... if the user has changed the value through Keyboard this will work
I hope this helps
kss
|
|
|
|
|
i want to create a blank process and decrypt my exe file and pause the blank process and memory overwritten with decrypted exe file and restart the process again (like process injection)
how to do that ????
Please Help Me ????
|
|
|
|
|
Wow! Just trying to come to terms with all the security implications of that makes my head hurt.
I think you might want to reconsider your strategy of implementing the protection for your software. Apart from anything else, where would you securely store the key to decrypt the exe so that no one else can do that themselves?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
hi
this is algorith of "TZ Executable Protector" and finally i found it .
i want to implement above steps for protecting my exe file . but how to do this ?
please give an example !!!!!
thanks ...
|
|
|
|
|
hdv212 wrote: this is algorith of "TZ Executable Protector"
I would mark that algorithm as malware. The idea that one process can inject an executable inside another (blank or not) is deeply disturbing.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Colin Angus Mackay wrote: hdv212 wrote:
this is algorith of "TZ Executable Protector"
I would mark that algorithm as malware. The idea that one process can inject an executable inside another (blank or not) is deeply disturbing.
Agreed. Assuming this description is correct, someone's exploiting a security hole in the OS. There's almost certainly not going to be any documentation on the (C/C++) implementation, and there's a risk of it being broken permantly if MS decides to close it up. I know they're killing the ability to patch the kernel in Vista without getting MS certification and approval first (no more rootkits). The only reason they haven't previously is that it would break too many existing drivers and low level apps. Since win64 would break these as well they no longer had a reason to keep the hole alive. This is even less likely to be kept alive.
|
|
|
|
|
Hello board,
I looking for something that is similare to the MessageFormat class from java.
String.format() does a lot ofthe stuff I need, but I´m wondering if there is anything like the ChoiceFormat, where different phrases depending on a variable can be returned.
i.e.
"There {0,choice,0#are no cars|1#is one car|1<are {0,number,integer} cars} on the street.");
Any idea? Thanks for any answer,
Fridi.
|
|
|
|
|
Fridi69 wrote: Any idea?
You would have to create your own method for that sort of thing.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|