|
kensai wrote: Is there a way to retrieve just the records you want in the first place?
But of course. You have the userid, create a proc that returns the records for that user and bind the resulting datatable to the datasource. Changing datasource is a standard operation!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Unfortunately, the database is Sql Server CE which doesn't support sprocs
I think I need a way to bind data to a tableadapter custom method which returns records according to a parameter, in this case ID. No idea how to do this though
|
|
|
|
|
How do you get your data now, presumably SQL strings if procs are not supported. What's wrong with the following.
Select * from Records where UserID = iUserID
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello All,
I have a problem with event that I am generating after file download.
The flow is like this
1.initialize the DownloadfileCompleted event handler.
2.DownloadFileAsync(URI,str2)
3.After download completed it should display "download complete"
4.return "downloaded successfully"
but the problem is if the downloading takes more time it is directly coming to step 4. without waiting for completeion of step 3.
how can i make step 4 to wait until completeion of step3..
Thanks in Advance,
Ashok
ashok
|
|
|
|
|
How does step 1 look like in code?
I are troll
|
|
|
|
|
1. objWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(Event_DownloadFileCompleted);
2.objWebClient.DownloadFileAsync(new Uri(p_strSourcePath), l_strDestinationPath);
3.MessageBox.Show("Updated Successfully");
4.public void Event_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
MessageBox.Show("Download Completed");
}
ashok
|
|
|
|
|
I wrote same code before, it works well.
please check source file before download,
and you add try catch block to get whether exception.
Glad to discuss with you and best wishes.
|
|
|
|
|
To make it block the execution;
public bool downloadIsDone = false;
public void ZeDownloadMechanism()
{
objWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(
Event_DownloadFileCompleted);
objWebClient.DownloadFileAsync(new Uri(p_strSourcePath), l_strDestinationPath);
while (!downloadIsDone)
Application.DoEvents();
MessageBox.Show("Updated Successfully");
}
public void Event_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
downloadIsDone = true;
MessageBox.Show("Download Completed");
}
Why would you want to block execution on a Async-download?
I are troll
|
|
|
|
|
ThanQ for your help, can u brief the differences between normal download and async-download?
ashok
|
|
|
|
|
Sync (normal) blocks execution, Async doesn't. Simple example, if you normally play a soundfile in VB6, then the computer will not execute anything until the sound is finished playing. If you play it async, the computer will "move on", and execute your next instruction.
Hope this helps
I are troll
|
|
|
|
|
Hello,
I have an issue regarding executing a file.
The file is exectued by a launcher and we want to modify this launcher.
Unfortunately the source code for this launcher has been lost and we do not know how to execute the file anymore.
Therefore the launcher must be totally recreated, which has been done up to this single part...
Is it somehow possible to find out how to execute this file?
Or better asked: Is it possible to find out what command the launcher sends to execute the file?
Any solution to find this out would be nice!
I can already tell it is executed with several arguments by the launcher.
I thank you sincerely in advance,
OsoreWatashi
|
|
|
|
|
What language was this launcher written in? You can't use a decompiler such Reflector to take a look? Is their any documentation available for the exe? Have you run it on a commandline with a /? arguement?
I would also suggest source control in the future.
only two letters away from being an asset
|
|
|
|
|
Create a console-application that writes all the parameters that are passed to it, to a plain text-file. Next use the launcher on your new console-application. You now have a text-file that holds all the parameters that the old launcher sends when starting an application.
Hope this Helps,
I are troll
|
|
|
|
|
I already tried that before posting the question here.
There are no parameters passed to the .bin file recording to the parameters list.
Though I am very sure there are a few argument passed, named:
IP PORT
Through HexEditing I can find there is a third argument something like an ID.
The IP and PORT arguments are not the problem and are known by the development team, the ID is not and we do not know the syntax used to construct this ID.
Therefore my question if it is possible to retrieve this.
The launcher does execute te file in question and if I replace it by my custom console application, it does launch the console application.
The result is no parameters at all with a simple foreach-loop...
It is for sure there are arguments passed to the .bin executable, because it gives a message when it does not receive those.
Maybe you have another suggestion?
Yours sincerely,
OsoreWatashi
|
|
|
|
|
There is no documentation on how this ID is generated? That's going to be though to re-engineer
I are troll
|
|
|
|
|
Indeed there is no information on the arguments passed to the .bin file to execute it.
If we are only able to see what gets passed in as arguments, we are able to reverse enginere the generation of the ID without too many problems.
|
|
|
|
|
Creating a proxy-console that simply passes and logs the arguments?
Reverse-engineering might be difficult if you don't know the reasoning behind the numbers..
I are troll
|
|
|
|
|
I'm sorry, a proxy-console?
You have to know that is just all on a local machine not using any internet-connection or what-so-ever.
The files are all generated with VC++ 6.0 if that may be of any help.
The reason behind the numbers will be obvious as soon as they appear.
|
|
|
|
|
A console that does nothing, except launch something else with exact the same parameters that it received. This way the console "mimics" the client that is launched. When it has received all parameters, it can launch the child-proces that the original proces intented to start.
Old viruses displayed this behaviour; on infection, they'd replace a command and write a virus on that place. So whenever the user thinks he starts that command, the virus is started. In order to stay unnoticed, the original program is executed by the virus.
I are troll
|
|
|
|
|
hi,
i have developed one application using c# and sqlserver 2000.but i am new to c# networking programming .now my application is working in one system only. but i want to work that application in other clients systems.in frontend i have given connection string as
string s="server=local;database=cm;uid=sa;pwd=.";
I wanted the database to reside in the server. Develop the application and upon deployment of this application to all my network clients, they must be able to access the database.
please some one help how to access database from cliens system also.
thanks
ragards
Jagan.
|
|
|
|
|
The database must be configured to accept communication over the network (SQL Server 2000 will accept TCP/IP communication by default as I recal). Your connection string must also refer to the server. In your connection string replace "local" with the name of the server.
|
|
|
|
|
I have a usercontrol made of some labels. As soon as I add the usercontrol to a tabControlPage, all the fonts in the usercontrol are resized to whatever the font setting of the tabControlPage is.
How do I stop this?
|
|
|
|
|
Set the .Font property of the controls inside the container. You could do it dynamically with a loop at runtime if your willing to take the performance hit, or just set em manually in the designer.
|
|
|
|
|
Have sorted it out
UserControl has a property called 'AutoScaleMode'. Setting this to 'None' prevents the usercontrol from being resized when added to a container control.
|
|
|
|
|
hi ,
i am going to create a counter app, to count the number of pages the user printed, no matter where to print(for example from office or notepad or paint and... just print!)
is there any way? is there any unmannaged code?
|
|
|
|