|
Actually i have made one application in C# for importing .CSV file.
My program takes file and put all data from .CSV file to database.
It is working properly on localhost,but when i run that on server it gives me error that unable to find taht path of that selected file
what can be the problem?
i am unable to find that one
Please help me
Jayraj
|
|
|
|
|
Does the application get the full path of the file or does it use some kind of relative path. Can you show the code where you open the file for reading? That might help finding the cause of your trouble.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
hi All
I am create Qurey like " SELECT c_EmpFName As Name,c_EmpCode As Code, c_CardCode As CardCode, c_BankName AS BankName ,c_AccountNo AS ACNO, c_qualification AS Qual FROM dbo.t_EMPINFO WHERE (c_Softdelete = '1') ";
and Excute by using "OleDbDataAdapter" and fill the DataSet Object "ds"
now i want to bind this ds to crystal report object how can do it
Is any one Help me !!!!
thank !!
|
|
|
|
|
ReportDocument doc = new ReportDocument();<br />
doc.Load(...);<br />
doc.SetDataSource(ds);
Here ya go.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
Hi
I have a problem of binding a arraylist to a data table. Could you help me please?
ArrayList aList=new ArrayList();
aList.Add("Value1");
aList.Add("Value2");
aList.Add("Value3");
aList.Add("Value4");
I wannt to bind the aList value to a data table in c#. How to do please?
kesavan
|
|
|
|
|
create object of arraylist
ArrayList aList=new ArrayList();
then fill the Arraylist and finally create one object of datatable
and then give the DatSource as Arraylist object ( i.e. aList) and then bind it refer below code;
datatableobject.DataSource = aList;
datatableobject.DataBind();
It will be work !!!!!!!1
|
|
|
|
|
Hi guys,
I think I need some serious painkillers on this!
Short version:
Can anybody explain in details how to expose a C# WinForms Control as ActiveX control. Either via hosting it in a MFC ActiveX control or by implementing it completely in C# (implementing all interfaces, registration/unregistration stuff, events).
Perhaps somebody has a template project for this problem where I just can drop in my Windows Forms Control and is willing to share it with me and the others (sounds like XMas, I know).
Bloody details:
We have a large client application with lots of legacy code that implements an ActiveX container. So you can add e.g. GUI components by providing new ActiveX controls. Since we have almost year 2007 we want to develop new GUI components with Windows Forms instead of the existing MFC/OWL stuff (yes! OWL! ). We recently migrated to Visual Studio 2005 (.NET 2.0).
As far as I can see there are 2 main approaches:
(Approach 1) Use of a MFC ActiveX control for hosting the Windows Forms control and use the new MFC 8.0 template classes CWinFormsDialog[^] or CWinFormsView[^] for adding the WinForms control to a CDialog/CView.
(Approach 2) Implement all necessary COM interfaces completely in C# and make them visible to COM and do the extra COM registration/unregistration stuff as explained here[^]. So the resulting component would be completely written in C# with no other languages involved. Furthermore we have about half a dozen COM interfaces for communication between the client and the ActiveX component. These interfaces must be implemented too. Sounds like very much more work than approach one.
So we decided to follow approach one - hosting a WinForms control within a MFC ActiveX control. What a pain until now!
This is what we did (following the MSDN examples[^]):
(1) Created an "empty" MFC ActiveX control, with all of our COM interfaces, showing an empty CDialog. Works flawlessly when added to the client application or to the ActiveX Control Test Container.
(2) Enabled Common Language Runtime Support (/clr) for the project. After fixing some compiler warnings the project compiles fine to MSIL.
( #1) Here is already the first major problem: When the project is started after '/clr' is activated, Visual Studio 2005 locks up completely while loading the CLR DLLs (e.g. 'mscoree.dll', 'mscorwks.dll'). There is no error message or crash, but VS2005 hangs infinitely and the only thing to do is killing the 'devenv.exe' process. Why is this? But it's possible to start the application regularly! Only when started via VS2005 it hangs. The ActiveX still shows up correctly when the application is not launched via VS2005.
(3) Since I found no solution for this problem I sighed and added a CWinFormsControl member to the "empty" CDialog as described in the MSDN example here[^] (which works by the way perfectly when used in a stand alone dialog application). I tried two variants:
CWinFormsControl<WinFormsCtrl::UserControl1> m_WinFormsCtrl;
CWinFormsControl<System::Windows::Forms::LinkLabel> m_WinFormsCtrl; The result was the same in both cases:
( #2) When the ActiveX is about to be displayed it crashes in 'CWinFormsControl<TManagedControl>::InternalCreateManagedControl' (<VS2005-install-path>\vc\atlmfc\include\afxwinforms.inl). Output window says: A first chance exception of type 'System.AccessViolationException' occurred in <MyActiveX>.OCX
I got this information by attaching to the application process with VS2005 when the application is already running.
I read several threads where members of the Visual Studio Team and MVP's are saying that MFC 7.1/8.0 are officially supported unmanaged hosts for Windows Forms controls, just like Internet Explorer. But it seems not to apply for MFC ActiveX controls!?
P.S.: I already tried it in the C++/CLI board but got no answer at all.
cheers,
mykel
If they give you lined paper, write the other way!
|
|
|
|
|
C'mon... doesn't anybody have experience with hosting WinForms controls inside MFC ActiveX controls?
There must be lots of large "legacy" applications out there which implement an ActiveX container for (GUI) extensions.
Any help is appreciated, even comments like "Careful, you'll likely get burned using this approach, because ..."
cheers,
mykel
If they give you lined paper, write the other way!
|
|
|
|
|
How Can iu have a Msi file with Unicode text like سس is it possible ??
MHF
|
|
|
|
|
how can i write the code for barcode reader to scan the
barcode so that i use that barcode in my application
|
|
|
|
|
yousafzai wrote: how can i write the code for barcode reader to scan the
barcode so that i use that barcode in my application
I'm sure the barcode reader will have a well documented API - you should read that documentation. The vast majority of people here probably don't know anything about barcode reader. The manufacturer of the reader will probably have a forum where you can ask if you are still stuck.
|
|
|
|
|
hi,
any barcode reader device will read only 'valid' barcodes. a barcode is valid only if it satisfies a criteria. please look on the internet for differnet barcode standards like EAN8 (8 digits), EAN13 (13 digits), UPC-A (12 ditits),UPC-E (8?) etc. as long as its valid and readable, it will be read by any scanner and scanner will transmit data to your host just like keyboard. please note that scanners normally automatically transmit EnterKey char at end of barcode.
regards.
|
|
|
|
|
I think you should respond to the OP rather than me. I think he'd prefer the information.
|
|
|
|
|
I’m studying computer programming, and I’m a little puzzled by the Composite design pattern.
In "Design Patterns in C#" by Steven John Metsker, Addison-Wesley, it says: COMPOSITE lets clients treat individual objects and compositions of objects uniformly.
And in "Programming C#", O'Reilly, it says about polymorphism: Thus, polymorphism refers to being able to use many forms of a type without regards to the details.
Is this not one and the same thing?
Programming is like Mathematics… you take ONE step at the time!
|
|
|
|
|
Polymorphism is one pillar of the OOP paradigm.
Composite is a design pattern, i.e. a very good solution to a well known problem.
I think you have to learn more about both OOP and design pattern techniques.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Polymorphism: being able to treat a car as an vehicle - using a base class reference to call virtual methods.
Composite: making a car of individual parts (motor etc.) and being able to treat both the motor and the whole car the same, e.g. calling Repair() on them.
The Composite pattern uses polymorphism (as most design patterns do), but it isn't the same thing.
|
|
|
|
|
Hi all!
i want to create a window just like window of solution explorer which can be "auto hide" if user wants to hide it. what such window is called? i mean what is its name and how to make it?
May God help u solv ur problems as well,thx in advance!!
shaz Jazz
|
|
|
|
|
I believe what you are looking for are autohide docking panes. The following link should bring you to a fairly good article on doing this. By doing a quick search on the site you can find many controls similar to this. http://www.codeproject.com/vb/net/DockPanelSkin.asp[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi,
I want to place my visual component in Grid. In datagrid,its not possible to display any components...any suggestions on how to place it or any other grid which permit to display visual component?
Yes Im using .NET 1.1 framework. Hope you will reply
Shivaprasad
|
|
|
|
|
At the min im using c# and im not really too familiar with it, i have created a form with a piano on it in which all the keys are buttons and you press them and the internal beeper beeps, you can select your tempo and how long your note is and the duration of note or rest. This records all the info in a text file and then you put in the left hand, this places it into another text file. when you want to listn to the recording the files are mixed into one where all the notes that collide are seperated and sound as if they actually are two notes together because the console.beep function only allows one note at a time. I would really like to use midi or something to that affect that plays sound through either a sound card or just the speakers(through an internal sound board or whatever), ive looked at loads of c++ tutorials and vb ones too but there not much good to me because im not greate at importing dlls although im starting to understand it a bit.
Can anyone help me in any way, my email is bobjamin@aol.com. Its much appriciated.
!*!Tea!*!
|
|
|
|
|
You want to use DirectSound. Any examples in VB.NET will move to C# very easily.
Bobjamin wrote: because im not greate at importing dlls although im starting to understand it a bit.
It sounds to me like you'd do better to concentrate on core concepts before learning another library ( DirectX ). However, if that's what it takes to keep it fun for you, go for it. The DirectX SDK comes with plenty of samples in C# and VB.NET.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
In my .NET app, I instantiate a COM object from an installed application.
public static BobsPossesionsApp bob = null; // will later hold instance of BobsPossesionsApp
bob = new BobLib.BobsPossesionsApp();
IBobsHatsCollection hats = bob.Hats;
IHat firstHat = hats[0];
I was quite surprised to find that properties of firstHat could change in my application, if the Bobs Possessions application had changed them. In other words, the user is running Bobs Possesions, and my application creates an instance of the application and gets a Hat object from it. Back in the Bobs Possessions application, the user changes the color of Hat to red. And voila! - firstHat.Color changes from black to red in my application.
This surprised me, but I can live with. And I can even take advantage of it. However, if IBobsHatsCollection doesn't offer me any events to update me, how can I tell in my code when that Hat object has changed?
I would like an event to fire, that I can handle (as opposed to having to periodically poll the Hat.Color property). How can this be done? Can I get notification that a COM object has changed, if the COM server doesn't offer a notification interface?
I tried sticking the object in a Table, but none of the Table/Row/Column change notifications fired...
|
|
|
|
|
Hello World,
I'm trying to serialize a very basic object from a class I created in order to return it from a web service. However, the serialized object is always empty.
Can anybody help me with this please? Here's the short code and the response I get from the web service:
Thanks in advance!
<br />
[Serializable()]<br />
public class StatusCode : ISerializable<br />
{<br />
private bool _success = false;<br />
private string _statusCode;<br />
private string _statusMessage;<br />
<br />
public StatusCode() { }<br />
<br />
public StatusCode(bool success, string statusCode, string statusMessage) {<br />
_success = success;<br />
_statusCode = statusCode;<br />
_statusMessage = statusMessage;<br />
}<br />
<br />
public bool Success {<br />
get { return _success; }<br />
}<br />
<br />
public string statusCode<br />
{<br />
get { return _statusCode; }<br />
}<br />
<br />
public string statusMessage<br />
{<br />
get { return _statusMessage; }<br />
}<br />
<br />
public StatusCode(SerializationInfo info, StreamingContext ctxt)<br />
{<br />
_success = (bool)info.GetValue("Success", typeof(bool));<br />
_statusCode = (String)info.GetValue("StatusCode", typeof(string));<br />
_statusMessage = (String)info.GetValue("StatusMessage", typeof(string));<br />
}<br />
<br />
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)<br />
{<br />
info.AddValue("Success", _success);<br />
info.AddValue("StatusCode", _statusCode);<br />
info.AddValue("StatusMessage", _statusMessage);<br />
}<br />
<br />
}<br />
<br />
<?xml version="1.0" encoding="utf-8" ?> <br />
<StatusCode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/" /><br />
|
|
|
|
|
Dear all,
I am researching in Augmented Reality. I wish to capture live video image and mount on it a 3D Computer Generated Image. I am using C#, kind of beginner so any help will be greatly appreciated.
Kindest regards ...
A.Khadragi
|
|
|
|
|
ahmedkhadragi wrote: I am using C#, kind of beginner
Then I am afraid you're dreaming. Write some more simple programs that lead up to this, which means you need to learn C#, DirectShow, and Direct3D, at least.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|