|
Hi,
this[^] has all you need.
|
|
|
|
|
Good ... I test this solution!
Many Thanks!
Alex
|
|
|
|
|
you're welcome.
|
|
|
|
|
Dear All,
Im trying to read data from excel through Oledb.
OleDbConnection connCura = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=" + path + ";Extended Properties=Excel 8.0");
OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", conn);
The problem is that if the 'Sheet1' in the excel file had a another name instead of 'Sheet1', then im getting this error:
System.Data.OleDb.OleDbException: External table is not in the expected format. at ConfigQeKMS.ReadImportFile.ReadTheFile(String path, String extension, String scheiTeken) in C:\Documents and Settings\KaneshkaB\Desktop\30 DEC 2009\QeKms\ConfigQeKMS\ReadImportFile.cs:line 61
Can anyone tell me how to fix this?
Thanks.
|
|
|
|
|
|
Thanks Aman, it worked
|
|
|
|
|
Hi Experts
I am Working Win Form in .NET 2005(C#).
i am making user control that have only one progress bar and label show the %age of progress bar.Now i am creating a window Form on that i use This user
control.when suppose i start for loop from 1 to 1000 then progress bar also running according to my for loop in user control.
main problem is that when loop is running in the form that i have used this control then how to send the value to progress so that it increase the progress bar value.
Dinesh Sharma.
|
|
|
|
|
A similar question has already been answered before. Try here[^].
There are only 10 types of people in this world — those who understand binary, and those who don't. |
|
|
|
|
|
Hi,
Im using textbox in C# and i use this as C# dll in VC++.
But i cannot enter any value in that textbox.
Do i want to use any events for entering data..Pls help me?
Anu
|
|
|
|
|
You have asked a similar question twice already. Please post your question once only.
|
|
|
|
|
is the textbox not readonly? or enabled= false ?
|
|
|
|
|
Hi All,
I am using Report Sharp-Shooter of PerpetuumSoft for reporting in my project.
I want to insert graph/chart in my reports.
Can anybody tell me or provide some link to me on how to add graph/charts in Report Sharp-Shooter.
I have searched on google but i am mostly getting the links of purchase or free download of software.
Thanks,
Nagendra.
|
|
|
|
|
Your best bet is to contact the vendor, they are more likely to know
Bob
Ashfield Consultants Ltd
Proud to be a Code Project MVP
|
|
|
|
|
I'm trying to get the module handle of the loaded dll in order to pass it to SetWindowsHookEx() function. [Bascially I'm using the windows hook approach to inject the dll in another process]. However, GetModuleHandle always returns 0. What could be the issue? Here is the code:
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
public static extern IntPtr GetModuleHandle(string lpModuleName);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr SetWindowsHookEx(HookType hookType, HookProc lpfn, IntPtr hMod, uint dwThreadId);
IntPtr moduleHandle = GetModuleHandle("HookInjectDll");
// I tried giving full dll path, the .dll file extension, but nothing works. ModuleHandle returned is always zero. I also verified Assembly.GetExecutingAssembly() that the current dll path is correct.
int lastError = Marshal.GetLastWin32Error(); // This returns 0 i.e. success.
hookPtr = SetWindowsHookEx(HookType.WH_CALLWNDPROC, (HookProc)MyHookProc,
moduleHandle,
GetWindowThreadProcessId(targetProcessHandle, IntPtr.Zero));
Any help on this issue?
Thanks
|
|
|
|
|
tapas1979 wrote: This returns 0 i.e. success.
Nope. Your GetModuleHandle prototype is missing SetLastError = true
|
|
|
|
|
Marshal.GetHINSTANCE(typeof(MyClass).Module)
|
|
|
|
|
I have a crystal report that displays records from a database.Each record has a number field "QTY". I want to display sum of each record in a page
suppose i purchase product 3 times in different dates
product qty
monitor 30
monitor 40
monitor 30
i want to display like this
product qty
moniter 100
thanks in advance.
|
|
|
|
|
You can do this using the designer in your crystal report file.
|
|
|
|
|
Hi all,
how to get tables and columns from existing sql server backup file without connect to SQL Server?
Is it possible to get table names and column names form raw file like *.bak ?
Please help me.............
Thanks
Venkat
|
|
|
|
|
I don't how to select without connecting
bud to get column names from a table use:
SELECT COLUMN_NAME AS Databasekolommen FROM INFORMATION_SCHEMA.COLUMNS WHERE (TABLE_NAME = 'tablename') ORDER BY ORDINAL_POSITION
and to get table names:
SELECT [TABLE_NAME]
FROM WorkDB.INFORMATION_SCHEMA.TABLES
hope it helps
|
|
|
|
|
is it possible to get table names and columns without using SQLServer?
that means can i get table names and columns from raw file(*.bak)?
|
|
|
|
|
For a little something I'm just playing around with today I need the ability for an instance to query the state of one or more other instances.
The various instances will therefore be chained together by some technique.
The important thing about this is that the state of the referenced (source) instance can change and the referencing (client) instance should always receive the current state.
A.Input = B.Output
B.Input = C.Output
A should always know the current state of C.Output
Passing the state by value won't work. I thought about using events, but I don't think they're appropriate for the task.
In C (or C++) I might pass the address (or a reference) to the state value, but that's not easily done in C# and I want it to be read-only to the client.
What I've come up with as a workable technique is delegates, which makes sense, I really want callback functions.
In the above example, C provides a delegate to a method that B passes along to A and A can call to get the state of C.
This works fine, and I'm just wondering whether or not anyone else has done anything like this and how they accomplished it.
|
|
|
|
|
I haven't needed this yet.
I see two ways that cascade:
1. polling
C offers a property that B can get; based on that B offers a property that A can get.
2. event driven
as A uses B and should be unaware of C, there must be a mechanism between A and B, probably an event; and similar a mechanism between B and C. So when C changes state, it tells its subscribers (B); and B getting such change, tells its subscribers (A).
And two ways that smash the cascade:
3. polling
define an interface, IMyProperty, and have both B and C implement it; now have B pass C to A as an IMyProperty. A doesn't care whether it is asking B or C then.
4. event driven
you could have B pass on the B->A delegate so it effectively becomes a C->A delegate however that complicates things a bit: B would need an AddEventHandler and RemoveEventHandler kind of methods, and keep the event itself private.
|
|
|
|
|
1. I'm doing that, the properties provide the delegate.
2. I have since realized that I probably need multi-cast ability so events may be needed.
3. That won't do it.
4. Except I think I need it to work in the other direction and I'm about to try it that way.
Edit: It works this way too. An output is a property that publishes a delegate and an input is an event (multicast delegate).
Outputs can be wired to inputs as required.
The receiving object only needs to execute the delegate(s) to determine the input value without caring where the value came from.
|
|
|
|
|
Arrg! It works until I create a loop, in which case I get infinite recursion and a stack overflow.
Ah, well, I think I can work around that.
|
|
|
|