|
Have just read your Subject again, are you trying to update your table using the update statement? If so then you should know that the update method of a dataAdapter is only used to update a database with changes made in your dataSet.
To insert rows into your table you need to use the dataAdapter.Fill() method.
Kev
|
|
|
|
|
I'm looking for some code which do the dial up through phone line?
would be nice if anyone can share thier code with me.
|
|
|
|
|
To see what I am talking about, create a WinForm application and add a RichTextBox to the form. Compile the application and run it.
Start typing into the richtextbox. Then paste an image into it. Then continue typing on the line below or above the pasted image. The flicker is unbearable.
If someone can give me some direction on overriding the OnPaint(PaintEventArgs pe) event to be able to successfully paint both images and text, it would be helpful and very much appreciated.
I posted once before and nobody provided any solution.
Thank you in advance for any help.
JB
|
|
|
|
|
|
I have an application written in C++ that allows me to write addons. It has a public .h file with some class definitions. I can create .dll that has known entry point and that entry point will receive as one of it's parameters pointer to internal class from the app.
Now I have C# library (that I use in other projects) and I want to use it within the application.
My first thought was to use regasm and use COM to do all the interop. Might work, but I've never done any COM from C++ and it looks a bit messy.
My second approach would be to use managed C++ (which I haven't tried either).
So my question is:
If I write my .dll with managed c++ and use my library (written in C#), will the application be able to load the library? How will CLR be loaded? This lib is written for .net 2, and I can use the new CLI C++, which looks nicer than 1.0
Also, If I have static objects within my library, will those be loaded upon each call?
Thanks.
|
|
|
|
|
Hi,
My suggestion is ,
Create Com (ActiveX Dll),using ATL.It's very simple .And u Don't Have To Break Heads On it.
Start -> ATLCOMAPPWIZARD -> Create Simple Object , This Will Your Interface from Outside.Okay,
Now,
Create Methods Exactly With Same As In Your Class written C++ [ ".cpp And .h"].
Each Methods In The Interface Will Actually wraps The Methods In Your .cpp .
For Example :-
Your C++ Class Implements add Fuction
YourClass.add(long a, long b)
you just call this method from
YourDll.Add(long a,long b)
create the dll.
u can add this dll into C# project.By Add reference Method
[Note:- U Can Use This In Any Language that Supports COM]
Okay.Any doubts feel free to contanct me
by
baijumax
|
|
|
|
|
I think you misunderstood my question.
I have .net library that I need to use from within C++.
I do not need to expose C++ as COM, I wanted to expose .net as COM and use it from within C++.
|
|
|
|
|
Without using managed c++, also if your apis exposed do not have complex data structures used, you can export the dll and straight away marshal these apis to your own defined api and use it in your code using pinvoke.
For e.g.
[DllImport("Advapi32.dll", CharSet=CharSet.Auto)]
static extern Boolean FileEncryptionStatus(String filename,
out UInt32 status);
Try some search on pinvoke.
- Shailesh
|
|
|
|
|
The app has several quite big C++ abstract classes. My dll will get loaded and passed one of the classes (actually some object derived from this class).
|
|
|
|
|
I am not sure i understood you, you want to import the class or class static functions?
Could you elaborate a little more?
- Shailesh
|
|
|
|
|
hey dudes, I'm trying to make an app that looks like the new Windows XP wizards in C#, but the best way I found to do it is adding and removing the controls in the main form as I needed, I search for an example but I didn't find somethin', someone knows a better away??
thnx in advanced and sorry for my poor english
|
|
|
|
|
I am using the Windows Forms DataGrid and I would like to change the Foreground and/or Background colors of individual columns. Could someone suggest the easiest way to do that?
Thanks!
Mark
|
|
|
|
|
hi,
Pleasse refer my article DataGridFormattings. There i mentioned every thing what you need now.
Sreejith Nair
|
|
|
|
|
Hi,
Is it possible to create application in C# to work with a scanner?
Since I want to scan the document, and then save it to SQL Server.
If it's possible, please kindly give me some information on how can I do this.
Since I've tried looking in MSDN and couldn't find any resources.
Thank you very much in advance
Best regards,
Antonius
|
|
|
|
|
The term you are looking for is "Windows Image Acquisition" (WIA)
|
|
|
|
|
The reason:
I made a tooltip control that doesn't rely on dllimports at all which is pretty cool i think
and i want the control to appear below whatever button summons...I don't want to just use mouseposition and load it where the mouse clicks because that would look unprofessional i think.
The question:
How to i get the location of a control relative to its position on the screen. I was thinking of somehow determining incremently all the outermost parents that encase the button that i want the screen coords of and adding up some stuff...
Are their any cleaner methods?
|
|
|
|
|
Something like this maybe...
Point screenPt = control.Parent.PointToScreen(control.Location);
|
|
|
|
|
TY! worked perfectly :P
Here's the code i used to put it below the button
Point spot = this.button1.Parent.PointToScreen(this.button1.Location);
this.panelbar.Left = spot.X;
this.panelbar.Top = spot.Y + this.button1.Height;
|
|
|
|
|
To see what I am talking about, create a WinForm application and add a RichTextBox to the form. Compile the application and run it.
Start typing into the richtextbox. Then paste an image into it. Then continue typing on the line below or above the pasted image. The flicker is unbearable.
If someone can give me some direction on overriding the OnPaint(PaintEventArgs pe) event to be able to successfully paint both images and text, it would be helpful and very much appreciated.
I posted once before and nobody provide any solution. Is that because noone has a solution or is it because noone is willing to help.
Thank you in advance for any help.
JB
|
|
|
|
|
Hi,
i wrote a program in vc++ and it generates some data values which i am writing it into a .txt file. Now for ploting a graph for tht data I am importing this file in excel and plotting the graph. But what i want is to open an excel sheet directly from my proram while executing and write the data whenever generated into it or to open an excel file at the end of program and import all the data in the txt file into it directly.
is it possible to implement this?.. if it is, is it very hard doin by writing handler programs or so...?
any suggestions or advices r appreciated.
thanks in advance,
Suman
|
|
|
|
|
You can open excel by using the System.Diagnostics.Process.Start(myString);
where myString is the path of the exe you wish to run.
i.e. myString = @"c:\program files\microsoft office\excel.exe";
if you want to open a file with excel then something like the following code would work.
System.Diagnostics.Process.Start(myString, @"c:\myFile.xls");
Hope this helps
Kev
|
|
|
|
|
Hi Kev,
thanks for ur help but actually my program is in VC++ and i forgot to mention it and tht too i placed it in a wrong board. Anyway if u have any idea in vc++ plz lemme know.
thanks,
Pavan.
Suman
|
|
|
|
|
Try the VC++ boards mate, they should be abel to help you.
Kev
|
|
|
|
|
yep... I have posted it there also and got some useful responses. at present i am workin on their replies and links given....
anyway thanks for ur advice... and sorry for posting it over here
Suman
|
|
|
|
|
no problem, sorry i wasn't able to help more.
Good Luck solving your problem
Kev
|
|
|
|