|
|
the procedure execute correctly and the data in DB changed.
but the return value is -1
why?
return value just useful when execute sql query?
|
|
|
|
|
I have a parent class, Base with 2 child classes, Child1, and Child2.
Base has a public int iNo. I init Child1 from another class. So Child1 inits Base.
Now, in Child1, I set Base.iNo = 10. Then i create the second child class, Child2 from Child1. Now, in Child2, when I call Base.iNo, i don't get 10.
I know the problem is that the child classes works with 2 seperate instances of the Base class, but how can i resolve this.
i want both child classes to inherit from the same Base instance. How do i do this.?
Thank you
There's someone in my head but it's not me - Pink Floyd
gunigugu
|
|
|
|
|
You inherit a class, not an object. Child1 and Child2 only inherits the definition of Base, Child1 objects and Child2 objects still are separeate objects. It's the same way as if you have two separate Base objects, they each have there own set of members, although they come from the same class.
If you want to share a member across objects, you have to declare it as static.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you very much, I never thought of static variables...
There is someone in my head but it's not me - Pink Floyd
|
|
|
|
|
I have a C# Windows Forms application, where the executable really has to be small. It has about 5 or 6 forms, and the executable size is about 230 KB. By toggling the show all files in the Solution Explorer in Visual Studio, I can change the Build Action from Embedded Resource to None for the .resx files generated by the designer. With this, I shrank the EXE size to 100 KB.
My forms are not Localizable , and I haven't included any graphic files directly. The ImageList s I use are loaded from a bitmap strip with code, and not in the designer.
My code as it is doesn't break without the .resx files, but I wonder if there are other situations where they are used that I'm not aware of.
So, does anyone know?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi,
I want to create a Textfile in the remote system meaning(i'm having only the URL, where the file to be created e.g: http://url/folder ). Inside the folder i want to create a file. Is there any classes to create a file in remote system? And is it possible to make the file as hidden file. If anybody knows solution to my problem please let me know to solve it.
Thanks and Regards,
Vinoth
|
|
|
|
|
I want to control gamepad in C# but i don't know how!
Using directinput?
or else?
is anyone have any sourcecode about this?
please help me!
sorry because of my poor English
|
|
|
|
|
DirectInput is what you need to use.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for your reply
But can tell me more detail?
i don't know how to use directinput in C# to control gamepad
thanks;)
|
|
|
|
|
Download, install and read the docs for the DirectX SDK. It has sample code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Instead of the quite bulky DirectInput you can simply P/invoke the joy* functions. I've done this to support a footswitch that's behaving like a joystick and it works well.
THis MSDN article[^] might help you.
Regards,
mav
|
|
|
|
|
i did it!
Really Really thanks,
|
|
|
|
|
Hi,
Are there any tools(commercial or free) to convert c#
runtime intermediate output to those non-runtime intermediate
language exe so that user cant re-engineering the exe easily ?
thanks
|
|
|
|
|
|
They don't really help that much, and htey sure don't do what he's hoping for.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No, there are no tools to do this that I know of. You can run ngen, but it has to be run on the target machine, so unless you're distributing the dll by hand....
The best you can do is obsfucate your code with one of the obsfucators out there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
This is driving me mad, two almost identical code segments, one works the other does not.
Trying to push data to a Crystal Report
The code is
______________________________________________________________________________
private void accessrpt_Load(object sender, System.EventArgs e)<br />
{<br />
rpt_log rpt1=new rpt_log();<br />
<br />
sqlstring="SELECT STATUS, SITE, START_OF_ROAD, DEPARTED, ARRIVED, END_OF_ROAD, NAME, REASON, ACTION, COMPANY, ROAD_CHECK_REQUIRED, COMMENTS, SITE FROM ARADMIN.TCC_SITE_ARRIVAL_LOG WHERE (NAME = '"+Class1.strVariable +"')";<br />
System.Data.OracleClient.OracleConnection oconn= new System.Data.OracleClient.OracleConnection("user id=hidden;datasource=oracle1;password=hidden");<br />
<br />
System.Data.OracleClient.OracleDataAdapter oda= new System.Data.OracleClient.OracleDataAdapter(sqlstring,oconn);<br />
<br />
oda.Fill(tcc_log1);<br />
tcc_log1.WriteXml("c:\\datadump.xml");<br />
<br />
rpt1.SetDataSource(tcc_log1);<br />
log_rep.ReportSource=rpt1;<br />
}<br /> ______________________________________________________________________________
I know the dataset is correct - the XML dump is exacly what the SQL requests.
But cystal reports pointing to the same dataset (as on the last two lines of the sample above) shows the correct headings, gives no error messages but shows no data.
Can anybody suggest where I am going wrong ?
Thanks
|
|
|
|
|
Solved the problem (oh for good error trapping reports)
I needed to apps the table as well as the datatest to Crystal reports
i.e. rpt1.SetDataSource(tcc_log1.Tables[1])not what was used.
|
|
|
|
|
wat does this mean >> Type or namespace definition, or end-of-file expected
can someone advise me wat to do..
|
|
|
|
|
My first guess would be that you don't have your { and } braces paired up properly. One of them is probably missing somewhere.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I would like to display a Cursors.WaitCursor on a ListView control, so I tried:
listView.Cursor = Cursors.WaitCursor;
but it doesn't work at all, I see always the default cursor.I know its a known ug in .NET 1.0 and probably fixed in 1.1. But I need workaround for 1.0.
I would appreciate any help in this regard.
Live Life King Size
Alomgir Miah
|
|
|
|
|
Hi,
I also had the same problem.I think it is not working with list views!
Have a nice day!
|
|
|
|
|
hi everyone;
my problem:
I have a userControl
in this usercontrol, I have a child control (a button)
when the mouse moves over the userControl, I can detect the movement using
MouseMove event.
the problem is when the mouse is on the child control : I can t detect
anything when the mouse move. userControl don t recieve the MouseMove event.
I did many search on this problem, but solutions I found are not elegant:
1- using hooks (not a part of .net platform)
2- the child control report the mouse movement to the parent control (the
userControl here)
please, can u explain me how to solve this problem?
thnks
n.b.: sorry for my english
|
|
|
|