|
Hi I'm not sure if this will answer your question entirely as I did not fully understand it. but I wrote a blog post last year sometime that helps to explain how you can get the parameters of a stored proc by using code.
Hopefully this will help in some way.
Stored Procedure discovery routine
|
|
|
|
|
hi, does anyone knows how
to set properties to folders or files
outside my application
for example ' if I want to set all windows's
folders to be transparent...
thanks
shaul
|
|
|
|
|
What exactly do you mean with 'transparant'? Dot you mean you want to set the windows folder's property to hidden or so??
|
|
|
|
|
ya, that what I mean
I know it can be done
anyone?
|
|
|
|
|
You can set a file property to hidden
create a FileInfo object (System.IO.FileInfo) and use the SetAttribute function
|
|
|
|
|
Hy,
I have Problems to use the Updater Application Block. Have anyone an an example how to use it?
Thanks
Daniel
|
|
|
|
|
Hi,
I need to know what will be effective way to track if any value changed on form in windows application other than writting text changed or selcted value chnaged event on controls.
Ritesh
Ritesh
|
|
|
|
|
May be you can store all values of controls, converted to strings, into some string array, before enter to the form. And then, when you exit the from you can compare all values with values in this array in alike loop, converting them to strings again.
Alexander
|
|
|
|
|
Thanks for Reply, I thought of doing it but my form contains grid control also. Can you give some idea how other application handle this.
Thanks
Ritesh
Ritesh
|
|
|
|
|
How to know left coordinate of the current column in DataGridView relatively top left corner of the parent container?
Alexander
|
|
|
|
|
|
Muammar© wrote: it took me 3 hours just posting and editing to end up with this sh*t
It takes me about 5 minutes to post an article. However, I write it up fist in an HTML editor then copy and paste it. This means I can spell check it, check the formatting and so on. That process takes quite a few hours.
From the things I saw.
1. Put code inside <pre> tags. It will preserve the formatting. NOTE: There is a slight bug and any empty line needs to contain at least one whitespace character
2. Don't apply your own formatting. The styles of the website will be applied. Stick with <a> <img> <p> <h1> <h2> <h3> <br> <code> and <pre> tags. Some minor additions such as bold and italic can be used, but sparingly. Much more than that and you start fighting with the styles of the website.
3. Do not colourise your code. The parser will do that for you. e.g. if you put the lang=cs attribute in the <pre> tag the code project parser will colour your code for C#
4. Spell check your article. I don't know what "coop" means. "cope", possibly.
5. I don't really see what you are demonstrating. In both article you have some code and an explanation of the code, but there is no focus.
6. Unless you are showing a contrived example to get a point across the code should adhere to some generally good practices (it doesn't have to be "best practice", unless that it what you are demonstrating). For example, you have hard coded file names into the source. Not only that but they were as string literals at the point of use (rather than declared as a const). This is very bad practice and the correct alternative usually taught around the third or fourth lesson in a programming couse. The better appoach would be to have the file names relative to the application, or if they must come from the windows directory, then to find out what the windows directory is called rather than assume C:\WINDOWS (I have several computers and only one use C:\WINDOWS)
Those are just my opinions on areas that could use some improvement. Other people may have differing opinions.
|
|
|
|
|
thank you colin for taking so lont to write to me, i'll give it a shoot tomorrow i guess cuz im already fed up with the article
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
I need to create help file to my application but i don't know how to create it or what software to use
ma_refay
|
|
|
|
|
ma_refay wrote: I need to create help file to my application but i don't know how to create it or what software to use
Check this[^]
________________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Hi all,
I'm working on a project that consists of variuos forms. In some situations, i need to store some values in variables and use them in other form. How to do such thing?.
thanks in advance
|
|
|
|
|
Moham`d wrote: I'm working on a project that consists of variuos forms. In some situations, i need to store some values in variables and use them in other form. How to do such thing?.
Well, I would read this article on the subject[^]
|
|
|
|
|
Colin Angus Mackay wrote: I would read this article on the subject
I did for kicks, and I must add it to my Must Read Articles in my CP blog
"I'd like to help but I don't feel like Googling it for you."
|
|
|
|
|
thanks for reply, this was helpfull
|
|
|
|
|
i have two problem with mdiparent
1-i want to put listbox on mdiform but when i open childform the list box control still on top over the childform and hide it i want listbox to be hidden when childform is open
2-when i try to change mdiform backcolor it's apply new color why?1
ma_refay
|
|
|
|
|
ma_refay wrote: 1-i want to put listbox on mdiform but when i open childform the list box control still on top over the childform and hide it i want listbox to be hidden when childform is open
Instead of putting the listbox directly on the mdiform, place it on the GroupBox control . On showing the child form call the Hide() method of the GroupBox control or set its Visible property to false .
ma_refay wrote: 2-when i try to change mdiform backcolor it's apply new color why?
because you changed backcolor (kidding)
To change the back color of your mdiform, use BackgroundImage property, instead. The BackColor property doesn't change the back color of MDIContainer form (if it does then I don't know the way). Some controls inherit some properties of its parent. That is why when you set the BackColor of your MDI, it was get inherited by the control, which is placed on the mdi form.
Regards.
________________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
hellow to all ..
i have a vb.net code that use ADO.NET
i need to make it work on C# ..
but when i write it down i got two erros ...
i don't know why ! it is ado.net code it have to work in anylanguage .
i got the error where the arrows are ..
thxx to anyhelp ..
{
string SQLContract,SQLContractPay;
int ContractIndx;
ClsInfo Assist_Var = new ClsInfo();
SQLContract = "INSERT Contract( " +
"ClientNum,ContractType,BDate,EDate," +
"UDate,ContratOption,PropertyNum,"+
"HierMeters,MeterPrice,Remarks)" +
"VALUES( " +
txt_Client_Name.Text + "," +
Assist_Var.PrepareStr("B") + "," +
Assist_Var.PrepareStr(dtFromDate.Text) + "," +
Assist_Var.PrepareStr(dtToDate.Text) + "," +
Assist_Var.PrepareStr(dtChange.Text) + "," +
Assist_Var.Val(txtYears.Text) + "," +
Assist_Var.Val(txtPropertyID.Text) + "," +
Assist_Var.Val(txtMeters.Text) + "," +
Assist_Var.Val(txtMeterPrice.Text) + "," +
Assist_Var.PrepareStr(txtRemarks.Text) + ");" +
"SELECT @Indx = @@IDENTITY" ;
OleDbConnection OleDbConn = new OleDbConnection(Assist_Var.SQLConnection());
OleDbConn.Open();
OleDbCommand OleDbCommand = new OleDbCommand();
OleDbCommand.CommandText = SQLContract;
OleDbCommand.CommandType = CommandType.Text;
OleDbCommand.Connection = OleDbConn;
OleDbParameter MyPara = new OleDbParameter();
------->>>> 'MyPara = new OleDbParameter("@Indx",SqlDbType.Int, 4);
MyPara.Direction = ParameterDirection.Output;
OleDbCommand.Parameters.Add(MyPara);
try
{
OleDbCommand.ExecuteNonQuery();
---->>>> 'ContractIndx = OleDbCommand.Parameters("@Indx").Value();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
|
|
|
|
|
What I want to know is, why are you instantiating an OleDbParameter then attempting to write over it. In other words: Why are you creating an object then not using it?
microuser_2000 wrote: OleDbParameter MyPara = new OleDbParameter();
------->>>> 'MyPara = new OleDbParameter("@Indx",SqlDbType.Int, 4);
Well, looking at the documentation for OleDbParameter[^] it would appear that you are passing a SqlDbType when it expects an OleDbType .
microuser_2000 wrote: ---->>>> 'ContractIndx = OleDbCommand.Parameters("@Indx").Value();
This is because you have not translated the VB.NET code. The indexer property uses square brackets in C#. [] not parenthesis ()
Some other questions:
This appears to be connecting to a SQL Server database, why not use the equivalent classes in System.Data.SqlClient ? It would be more efficient.
Why are you injecting values into the SQL statement? It blows a great big hole through any security you have in your application (if you have any at all) that allows an attacker almost direct access to the database. You might want to read about SQL Injection Attacks and some tips on how to prevent them[^]
|
|
|
|
|
hello
sorry for the late reply ,
i wanna take the value of the indx after it has been inserted and to save it to use it in another statment ...
|
|
|
|
|
microuser_2000 wrote: i wanna take the value of the indx after it has been inserted and to save it to use it in another statment ...
Excellent. So after following the advice I gave in my previous post what part are you stuck on now?
|
|
|
|