|
What is the error that is thrown?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
can not convert from object to bool
|
|
|
|
|
Well I guess you can make a check like:
bool myBool = comp.value==1?true:false
Muhammad Talha
|
|
|
|
|
Mr.Kode wrote: checkDone.CommandType = CommandType.Text;
This should be checkDone.CommandType = CommandType.StoredProcedure;
You're creating output parameters so they won't take input. You can make them InputOutput parameters to take values and then they can alter them.
Mr.Kode wrote: bool mybool=bool.Parse(comp.Value).ToString();//error here
This line of code has multiple errors. comp.Value is object and Parse takes a string parameter. comp.Value is object and has not been set. Another error in this line is that after you "parse" to bool , you're using ToString() and assigning it to bool
You retrieve values from the output parameters after the command has been executed. And it would be
bool mybool = (bool)comp.Value;
The same for the other SqlParameter.
Mr.Kode wrote: checkDone.ExecuteScalar();
Why ExecuteScalar? Use ExecuteNonQuery if you're not retrieving a value.
And this question should have been asked in the SQL / ADO / ADO.NET forum
Eslam Afifi
|
|
|
|
|
hi
i have a datagrid with a hyperlink column.and "checkboxes"
when i check the checkbox the record will be deleted.so in this context i want disable the "hyperlink" when the chechbox is checked.
how to write the code can any any one help me.
|
|
|
|
|
csp wrote: i want disable the "hyperlink" when the chechbox
You can actually replace the href with a javascript:void(0) programmatically. But that would irritate the user since if he would try to click and nothing will happen. How about alerting the user when the checkbox is clicked, the hyperlink would not work.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
when check box is checked the corresponding record gets deleted logically in database.so no other events(like edit)has to be generated.this hyperlink redirects to other web page.this should not happen when checkbox is checked.
i have done for edit command,but for hyperlink i don't know what to do.
|
|
|
|
|
thank u i got it.but not using css.
any ways thanks.
|
|
|
|
|
Hi All,
I wrote code for class assembly named FTPUtility.dll using C#. After that i just rename that FTPUtility.dll file and used it in my application as reference. but it gives the error message
"Could not load file or assembly 'FTPUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Anybody can tell me why this error occured.
Pravin
|
|
|
|
|
Is the error observed in Visual Studio Build Output window?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
no, error does not appear in Build output window. it occures at the runtime
Pravin
|
|
|
|
|
Are you renaming after adding as a reference and building? It will naturally fail then.
Why are you renaming the DLL?
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
No, first i rename that dll file and after that i have added it as reference. It compiles fine. but shows FileNotFound exception at run time.
error message is as follows....
"Could not load file or assembly 'FTPUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Pravin
|
|
|
|
|
You need to remove the reference to FTPUtility and add it again
|
|
|
|
|
|
The .Net framework doesn't like it when you rename a file without changing the assembly metadata so that the two correspond. That's what is causing the error. To fix it, go into the project properties of FTPUtility and change the assembly name field to the new filename. Then rebuild the project and replace the DLL file
|
|
|
|
|
I have a windows forms app which goes and does some processing. While this processing is being done I have created a progress form which I want to show the current progress (this is not working correctly).
The code is:
ProgressForm frm = new ProgressForm();
frm.ProgressText = "Do step 1...";
DoStep1();
frm.ProgressText = "Do step 2...";
DoStep2();
frm.ProgressText = "Do step 3...";
DoStep3();
frm.ProgressText = "Completed";
This code will show the progress form, but it will not update the label text until all the steps have completed, then the progress form show "Completed", while the processing is still happening it shows nothing. Anyone know a solution?
thanks
|
|
|
|
|
You don't give your label a chance to paint itself because the main (UI-)Thread is busy performing your steps.
Either put a call to Application.DoEvents(); after each text update (beware - that's the quick&dirty way that can lead to other, unexpected problems) or do it correctly: Put the calls to DoStepN() into a separate thread so your UI will remain responsive. The class BackgroundWorker makes it quite easy.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi All,
How to send the video frames as bytes across the network using tcp/udp/or any sockets using Directshow.
How To use IsampleGrabber in Directshow.?
Thanks In Advance.
SHINOJ
|
|
|
|
|
i have some listview item and i have on this listview 2 column.
I want to insert my item into the listview in some way that each of the column will have some ( different ) text .
How can i do it ?
|
|
|
|
|
Note: Pseudo code, might need to make some minor adjustments
ListViewItem myListViewItem = new ListViewItem();
myListViewItem.Text = "Column 1";
myListViewItem.SubItems[0].Text = "Column 2";
myListView.Items.Add(myListViewItem);
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi,
Ive built an abstract class and defined a picture box inside it. what im trying to do is use that picture box`s click event in the main form class. i managed to do it inside the class by defining the eventhandler method there but when im trying to add the delegated method defined in the form class it says that the method isnt defined anywhere...
to be more clear, i have to assign the parent for the picture box (which is the form) to make it show up but when using that same parent
it doesnt work...
can anyone please help me?
thanks,
robert
|
|
|
|
|
Create an event in your class. The form can subscribe to the event, and you can invoke the event from the picture box's click event.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
thats a great idea! thank you!
|
|
|
|
|
hi,
i had a lot of tests since then and no time to deal with that problem. now that ive gotten back to it, i started thinking and... how am i supposed to use the pictur box`s event? if i could use it i wouldnt need to invoke a secondery event that subscribes to the form. im pretty sure im overlooking something vital but have no idea what it may be. its just not logical that i cant use the picture boxes event!
thanks,
robert
|
|
|
|