|
I tried changing the UpdateCommand with a custom string like "UPDATE locals SET LocalName = 'New Name' WHERE Username = 'john'"
This Worked, I mean, the Method returned the DataSet, and didn't give a 500 Internal Server Error, anyway the Method was completely USELESS now.
But I figured out that the problem is in the UpdateCommand Sql statement.
What's wrong there?
Username is not the Primary Key, it's only used for Authentication purposes on the final version.
How Can I have a correct Sql Statement, connected with the values that I could modify in the DataSet?
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
The only thing I can see that might be wrong with the SQL Query is that there is no space between the @LocalName parameter and the word WHERE.
If you wrap the dataadapter.update method call with a try/catch you could output any error that is generated, which should give you an idea of what to look for.
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
James T. Johnson wrote:
The only thing I can see that might be wrong with the SQL Query is that there is no space between the @LocalName parameter and the word WHERE.
Could you believe it was just this?
Da*n!
Thank You,
this is the great thing about The Codeproject, that new eyes see subtle errors!
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
Hi,
How do I create a textbox that doesn't get the focus even when it is clicked upon (other than setting enabled = false)?
Thanks
|
|
|
|
|
Hi,
There are several ways
1. Try using a label instead , seeing that the user wont be able to enter text, or
2. On the MouseDown Event , make it select the control that requires focus, IOW as soon as it gets clicked on, it must deselect itself and select the required control.
Hope this helps
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
To clarify, I am trying to create a textbox which, when the user types in numeric , will display those numbers but they shouldn't be able to directly click and type inside.
So a label won't solve the purpose.
|
|
|
|
|
|
jparsons wrote:
t.CanFocus = false;
That property is read-only . I wish it wasn't. Has cause major headache in the past
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Control.CanFocus is readonly. So I think this will not work.
|
|
|
|
|
I am creating a custom control that inherits the ComboBox class. I would like to use the ISite.DesignMode indicator to determine if the control is being viewed in design mode but the property always comes up false. MSDN documentation says the design mode indicator is stored in the ISite; therefore, if the Component does not have an ISite associated with it, this property is always false. Other things I have read said to assign the atribute to the class to designate which class to apply the ISite implementation but I have not seen any examples that put all the pieces together. Can anyone share with me this method or any other method that would allow me to determine when this custom control based on a combobox is in design mode?
Thanks,
Kyle
|
|
|
|
|
Does anybody know where i can get a trial version of C#?
|
|
|
|
|
The .NET Framework SDK is a free download +- 121MB from microsoft. You can use SharpDevelop as an IDE which is also free available
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Or you can order the trial version from this site:
http://msdn.microsoft.com/vstudio/productinfo/trial.asp
Have fun.
|
|
|
|
|
how can i clear screen in console applications?
|
|
|
|
|
|
thanks jared , i though of that solution but i wanted to know if there is a built function do this job
anyway thanks for replying
|
|
|
|
|
1.I can add an assembly to cache, but I cannot find it in dialog when you click "Add reference", how can I let my assembly to the dialog's .net assembly list?
2.I built two version assembly(v1.0.0.0 and v1.0.0.1) that included the same sn, also added them to cache, now I want to refer the certain version of them in my application, how can I do?
I have tried "Add reference", but I cannot find it because the problem 1, then, I used "Browse" to select a certain version dll(ie: v1.0.0.0) file because of using the namespace of the shared assembly, then I wrote a config file of application:
bindingRedirect oldVersion="1.0.0.0" newVersion="1.0.0.1"
But when I run the program, the application still link to v1.0.0.0.
Any thoughts?
Thank you!
I'm amumu, and you?
|
|
|
|
|
Feng Qin wrote:
1.I can add an assembly to cache, but I cannot find it in dialog when you click "Add reference", how can I let my assembly to the dialog's .net assembly list?
In the registry you will find a key where it lists all the directories it will search for. On my computer this is located at HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders . Just follow the pattern there and you'll be able to add your install folder to the list so that your assembly is listed in the "Add Reference" dialog.
If you don't want to modify the registry you can put the assembly in the %WINDIR%\Microsoft.NET\Framework\v1.0.3750\ directory and you should see it in the "Add Reference..." dialog. This is one of the directories that is specified in the registry in the above location.
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
Thank you, James, but how about 2nd question?
I'm amumu, and you?
|
|
|
|
|
I've never used the binding redirect before so I can't really comment on how to get it working properly.
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
I need to hook the keyboard messages system wide. This can be done by using SetWindowsHookEx() to do this.
HHOOK SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hMod, DWORD dwThreadId);
I got everything to work except the third param. What do I use for a handle if I want to do System wide hook?
Thanks for your time
|
|
|
|
|
This is not a C# question, but I'll answer anyway. Use 0 as the thread ID. Also, you will need to put your hook funcion in a DLL, so it can be loaded in every process.
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
Thanks for the information provided.
This is what I have right now:
public void StartHook()
{
int hookType = (int)NativeMethods.WH.KEYBOARD;
myHookProc = new NativeHookMethods.HookProc(this.hookProc);
hookHandle = NativeHookMethods.SetWindowsHookEx(hookType,
myHookProc, ??? ??, 0);
}
What do I put in the third parameter? Please help
|
|
|
|
|
|
Anybody can help me how can I implement C++ Copy Constructor in C# with a generic example.
Thanks in advance
|
|
|
|