|
Following is the code I am using...
<br />
protected override void DoDiscoverParameters(char parameterToken)<br />
{<br />
this.parameterToken = parameterToken;<br />
using (IfxCommand newCommand = CreateNewCommandAndConnectionForDiscovery())<br />
{<br />
IfxCommandBuilder.DeriveParameters(newCommand);<br />
<br />
foreach (IDataParameter parameter in newCommand.Parameters)<br />
{<br />
IDataParameter cloneParameter = (IDataParameter)((ICloneable)parameter).Clone();<br />
cloneParameter.ParameterName = BuildParameterName(cloneParameter.ParameterName);<br />
this.command.Parameters.Add(cloneParameter);<br />
}<br />
newCommand.Connection.Close();<br />
}<br />
}
There I get the error saying "Specified cast is not valid." only for informix. I am creating Enterprise Library for Informix using IBM .NET informix libraries.
Please help.
- ashish
|
|
|
|
|
Hello
I have a javascript that hides controls on a page depending on a few settings. At the moment I only call this script from the Page's Body_OnLoad event. The problem is I have a ASP:Button with autopostback = true, and when this is pushed all the controls that were hidden by the javascript suddenly appears. Where do I call the javascript to run it after every server request?
/Regards Magnus
|
|
|
|
|
Why can't you set the visible property on the server ? Otherwise, use RegisterClientScriptBlock to put the code in there every time.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks alot!
Actually I could use the .visible on server, but its quite alot to hide, and I already have the javscript ready so I'd prefer to call that. Also, I was interested in how one would go about doing it the other way
edit: and I also get "object required" if I hide with .visible on server and after that fire up the javascript.
-- modified at 7:29 Tuesday 27th September, 2005
|
|
|
|
|
Hi,
I'm trying to use the enter key on the pocket pc keyboard. Is there anyway that I can click on the enter key on the pocket pc keyboard to execute anything?
|
|
|
|
|
put this in you constructor code:
this.Enter += new System.EventHandler(this.MainForm_Enter);
And this to handle the event:
private void MainForm_Enter(object sender, System.EventArgs e)
{
//put any code here to handle the enter key
}
Cheers.
|
|
|
|
|
Hi
i have code like this:
else if (dane[0]==komunikat.PLPobierzRekord)<br />
{<br />
BinaryFormatter bf = new BinaryFormatter();<br />
MemoryStream ms=new MemoryStream();<br />
bf.Serialize(ms,Poldane[0]);<br />
byte[] buffer = ms.ToArray();<br />
<br />
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();<br />
byte[] bajt=encoding.GetBytes(komunikat.PLZwrocRekord);<br />
byte[] dana=new byte[bajt.Length+buffer.Length];<br />
for (int a=0;a<buffer.Length;a++)<br />
{<br />
•1 dana[a+bajt.Length+1]=buffer[a];<br />
}<br />
for (int a=0;a<bajt.Length;a++)<br />
{<br />
•2 dana[a]=bajt[a];<br />
}<br />
<br />
dana[bajt.Length]=149;<br />
<br />
•3 MessageBox.Show(this,"a");<br />
}<br />
where
•1, •2, •3 - breakpoint
And here is a surprise... breakpoint 1 and 2 work and visual studio stop on this point but never stop obn breakpoint number 3. Why?? When i trace program step by step last step is before breakpoint 3 and program leave this else if block?!
Greetings
|
|
|
|
|
Did you add this code recently ? Have you tried a rebuild all ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
i rebuid all... and nothing change... but i found an error i code... i try set element in array bigger then declared array... but i don't know why program don't return error?!
Greetings
|
|
|
|
|
Maybe you were writing onto the null terminator ?
Anyhow, if the breakpoint is not stopped, and the code is not called, then you're not running the code you're building, one way or the other. I don't know why.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi!
I guess the line before the breakpoint throws an exception that's not being caught.
This could be the reason why the breakpoint is never reached.
Regards,
mav
|
|
|
|
|
Hi,
it's weird but, i run program in VS in debug mode... any line don't throw exception... when i going step by step program move out from block without throwing exception and do not reach next line?!
Greetings
|
|
|
|
|
Try encapsulating the line in question in a try/catch block to verify if this is really the reason for the problems you're facing.
Sometimes excaptions get through unnoticed if they are not occurring in the UI thread. In this case the one thread just dies, but the rest of the program continues to run.
Regards,
mav
|
|
|
|
|
Hi,
it is it... when i encapsulate the line in try/catch block then i can see exception...
thx
Greetings
|
|
|
|
|
Did you add the MessageBox.Show line later? My guess is there is a mismatch between the PDB file and your executable. Try cleaning and rebuilding the solution, that should solve your problem.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Can anyone briefly explain me about and the differences between Remoting and Webservices
|
|
|
|
|
|
Hi!
I need a treeviewe which shows files and folders with tristate checkboxes file-specific +icons
Plz give the solution or give the code,Cdes a re there which do it individually and they are cryptic codes, I wanted something which i could understand,So it would be very nice of you,if u can give me some insight
Akshay
-- modified at 9:25 Tuesday 27th September, 2005
|
|
|
|
|
try searching CP, i know there are articles on treevies and seperate articles on associated icons, then just put the 2 together
otherwise it would be a lengthy post here, and its just replicating what is already said
hth
g00fy
|
|
|
|
|
ya but they are cryptic codes, I wanted something which i could understand,So it would be very nice of you,if u can give me some insight
|
|
|
|
|
I'm porting a MacOSX Application to Windows.
So far we've got a viewer.
Now I would like to be able to do is when one of our file is one the web and the user click on the URL, the viewer should open in IE, very much like what happen when you open a .PFD file on the web with IE.
Any pointers on how to do that?
Even C++/Win32 one?
|
|
|
|
|
Hi,
I've used HelpProvider class to show some help strings on form
controls. But when I write a Persian word in SetHelpString() function, I see some illegal characters instead of that Persian word. Can anyone help me to solve this problem please.
P.S: Persian language is known as Farsi language also!
regards,
Mehdi
|
|
|
|
|
Hi!
I have one buttons and two text boxes on a same page at two places, that means 4 text boxes and two buttons.
My problem is to set focus on relative button or set tab index to buttons.
When i press enter after enter both value in text boxes my focus gone to the another button which comes first in left hand side of the page.
How can i set foucus to the desired button , so that when i came out from text box it automatically should go to the its next button in stead of going to another buttons, which are assosiated with other text boxes.
I hope you great people can understand this problem, and help me to out of come this situation.
Thanx.
keep smilling.....b'coz smile is the shortest distance between people....
|
|
|
|
|
Hi,
I think the property TabIndex should help you. Setting this property (is an integer property) will set your controls into a special order, which can be traversed using the Tab-Button.
You can set this property directly using code or the property page of the control (within VS.NET).
Hope this helps
Regards
Sebastian
|
|
|
|
|
What is the easiest way to detect when applications launches and terminates using C#? What I want to do is make a program that monitors my application usage.
I've read that this can be accomplished with a c++ dll that uses hooks, but I would preferably use only C#.
|
|
|
|