|
Yes, it definitely will.
But not as long as he can't even compiler the code.
---
single minded; short sighted; long gone;
|
|
|
|
|
Vasudevan Deepak Kumar wrote: A neater stored procedure would have been more easier to debug
I agree. Just have the parameters be the fields that are being updated.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
You can't use the & operator to concatenate strings in C#. Use the + operator.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have the following function, but I am trying to have the application wait until the thread completes before it moves on but the application just appears to lock. can someone tell me what I might be doing wrong?
private void UploadTicketChnges(bool WaitForThreadToFinish)
{
TicketChanges TixChanges = new TicketChanges(mysql, mysqlcmd);
TixChanges.AppEventID = AppEventID;
TixChanges.AppMemberEmail = AppMemberEmail;
TixChanges.AppMemberPassword = AppMemberPassword;
TixChanges.configAPIURL = configAPIURL;
TixChanges.configDatabaseTable = configDatabaseTable;
new Thread(new ThreadStart(TixChanges.ProcessChanges)).Start();
if (WaitForThreadToFinish)
{
// wait for all the threads to finish
Thread.CurrentThread.Join();
}
}
|
|
|
|
|
Brad Wick wrote: Thread.CurrentThread.Join();
"Thread.Join() blocks the calling thread until a thread terminates."
you want the current thread to wait until the current thread has finished
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Yes I would like the main application that calls the thread to wait until its finished. I know this is not what threading is all about, but when I call the thread for the very first time I want it to wait until its completed. The other time's it is called is inside a timer which I don't care about it waiting until it's finished.
|
|
|
|
|
The only Join that makes sense is someOtherThread.Join() which makes the
current thread wait on someOtherThread.
As I said before
Thread.CurrentThread.Join() makes no sense, it makes the current<br />
thread wait until the current thread is finished, which is never since it is waiting...<br />
<br />
:) <br />
<br />
<div class="ForumSig">Luc Pattyn <a href="http://www.codeproject.com/scrapbook/ForumGuidelines.asp">[Forum Guidelines]</a> <a href="http://www.codeproject.com/script/articles/list_articles.asp?userid=648011">[My Articles]</a><br />
<br />
<hr>this weeks tips:<br />
- make Visual display line numbers: Tools/Options/TextEditor/...<br />
- show exceptions with ToString() to see all information<br />
- before you ask a question here, search CodeProject, then Google<br />
<hr></div>
|
|
|
|
|
Thread processThread = new Thread(new ThreadStart(TixChanges.ProcessChanges));
processThread.Start();
if (WaitForThreadToFinish)
{
processThread.Join();
}
|
|
|
|
|
I was looking for some examples and couldnt find any.
Anyone know of a C# example of a guitar tuner?
I would like to build one that have the same options as the tuner
on www.get-tuned.com/guitar_tuner.php
this is a flash example shown here.
Any help or direction would be appreciated.
Steve Welborn
Software Engineer
Inrange Consulting
|
|
|
|
|
I don't think C# can play a tone without using p/invoke, although I could be wrong. Playing a wav file is very easy, that may be the other way to do it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
As of .net 2 there is System.Console.Beep which can play tones.
|
|
|
|
|
PIEBALDconsult wrote: System.Console.Beep which can play tones.
I was actually searching for something equivalent to the classic PLAY command in QBasic. Would this be matching that requirement too?
|
|
|
|
|
Vasudevan Deepak Kumar wrote: QBasic
I remember that from the old days :-> I actually still have the QuickBasic 4.5 compiler on this machine, though I haven't used it in some time
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Dunno, never used QBasic. Never used any BASIC on PCs, only on PDPs and VAXen.
But I do have a copy of Turbo BASIC lying around here somewhere.
|
|
|
|
|
|
Thanks for the replies. I actually only had problems finding the sounds. At first I wanted to see if I could generate the tones myself progmatically, then I ran acrossed a website that had all the sounds for all the guitar tunings for me. So I went that route.
To play the sound I just used the mci commands. This will get me by until I finish the project. Since i put the mci commands and all the sound methods in a class I can easily switch it out for a better method.
Thanks again.
Steve Welborn
Software Engineer
Inrange Consulting
|
|
|
|
|
as i say in title is it posibble to catch a trigger fired from sql in c# or catchin stored procedure from c#. i search internet but couldn find anything. thanks
|
|
|
|
|
what do you want to do exactly?
a trigger fire when you transact a sql query such as insert or delete ... automatically by sql and its not necessary to do it yourself.
so if you want to anybody help you say more describe...
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
i have a project about chatting. but this chat will be done on a windows app and on an aspx web page. chat will be don between only aspx web page and windows app. no aspx to aspx or no windows app to windows app. only between aspx and windows app. i wrote problem here and i got some advices. first i tried to used evet catching but couldnt achive. then according to advices, i tried to use sqldependency. i got some sqldependeny exmples i wrote nearly same things but again couldn do it. now i will use ajax timer in aspx and system timer in windows app to check if there is new messge in sql. every messge will be inserted database and according to the time intervals i will check if there is new messg. but this is not a good techniq. and i asked is it possible to catch an trigger from sqi in c#.
it is good to share your ideas if u have
really thanks
|
|
|
|
|
_beginner_ wrote: and i asked is it possible to catch an trigger from sqi in c#.
No, it isn't.
Your solution is easy. You AJAX component keeps track of the last message date/time stamp in the database. All it needs to do is retrieve all the messages with a later timestamp. Easy...
|
|
|
|
|
We used some kind of SQL Event in a prior project I was working on.
I think you can flag a table in the database to post change notifications which you listen for in the application.
Though I didn't implement that part so I'm not familiar with it.
Googling might solve it
-Larantz-
|
|
|
|
|
It's possible to use SQL Notification Services to do this. The client would have to subscribe to an event generated by the notification service.
But, there's no "out-of-the-box" event that the client can catch.
|
|
|
|
|
I have a system that generates files and writes them to a local
directory on the same comuter.
The director is mnitored by a FileSysemWatcher that stores the name f the file to a database.
The probles is that the FSW, as appeares to be in a completely random manner-
sometimes ignores newly created files. If I cut the files to another directory and then manualy copy them back- the event does fire.
What can account for such unriliable behavior.
Obviously, the monitoring flag is on. Moreover, I doubt that I am having trouble with buffer overflow because I noticed this wiered behavior when not more than 2 or three files were generated.
I cannot relocate to db logic to the internals f the system that actually generates the files (It is a C++ library and I dont have the code).
Solutions and elegant workarounds would be appreciated.
Tahnx.
int a; if(a > 0) {...}
|
|
|
|
|
Hrusha42 wrote: FSW, as appeares to be in a completely random manner
Do you have any other system processes that is interfering with it?
|
|
|
|
|
Hi,
You have to set the InternalBufferSize property of the FileSystemWatcher, or else you loose events.
Look at the MSDN for more information.
Ami
|
|
|
|