|
Hi all,
i'm trying to develope a windows service which will listen on a database table (Oracle database) , when a record updated ,the service will store it on another database . (Sql Server database)
the question is what is the best methodology to detect database update?
my idea is to run a query periodically and check the update ?
is anyone have a better solution ?
thanks.
Hosam Kamel
Software Developer
|
|
|
|
|
Why not use a trigger on the Oracle table to insert a notification into another table that a record has been updated. Then, your service would simply scan the notifications table and retrieve the details from here. Architecturally, you would want the item to be removed from the notifications table when it has SUCCESSFULLY saved into SQL Server.
To be honest though, you don't need a windows service to do this. All you need to do is create a DTS/SSIS package in SQL Server that does the read and save for you, and then schedule it to run as a scheduled database job.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
We can run the SQL Profiler and store the changes for checking updates
Regards,
Sylvester G
|
|
|
|
|
hi all,
how can i check that a word file is open or not through C#.
thanks
|
|
|
|
|
Try to open it exclusive. If an exception occurs, it's already open.
|
|
|
|
|
Using the interop assemblies.
How to open a document with word in all Office versions?
(Can't add more than 1 refernce to the Microsoft Word X.0 Object Library)
|
|
|
|
|
Hi All
Does anyone know the behaviour of the TcpClient.GetStream().Write()
on .NET CF 2.0 or any wrong in my code ?
I wrote the code listed at the end and found that even the network cable
was disconnected from my server, the TcpClient.GetStream().Write()
was not blocked. That was the code continued to run the line Console.WriteLine("Breakpoint 2");
When the program started, the following output produced:
Sending: 0000000001
Breakpoint 1
Breakpoint 2
Sending: 0000000002
Breakpoint 1
Breakpoint 2
< network cable disconnected >
Sending: 0000000003
Breakpoint 1
Breakpoint 2
Sending: 0000000004
Breakpoint 1
Breakpoint 2
< network cable re-connected >
Sending: 0000000005
Breakpoint 1
Net Error
Sending: 0000000005
Breakpoint 1
Breakpoint 2
The following is my code snippet
private void Connect()
{
}
private void SendMessageThread()
{
String message = String.Empty;
this.IsRunning = true;
while (this.IsRunning)
{
try
{
if ((this.IsRunning) && (!IsConnected)) Connect();
if ((this.IsRunning) && (IsConnected))
{
if (message == String.Empty)
{
message = DequeueManagerMessage();
}
if (message != String.Empty)
{
lock (this)
{
Console.WriteLine("Sending: {0}", message);
Byte[] data =
System.Text.Encoding.ASCII.GetBytes(
message.ToCharArray());
Console.WriteLine("Breakpoint 1");
tcpClient.GetStream().Write(data, 0, data.Length);
Console.WriteLine("Breakpoint 2");
message = String.Empty;
}
}
}
}
catch
{
Console.WriteLine("Net Error");
Disconnect();
}
}
this.IsRunning = false;
}
Antony
|
|
|
|
|
Hi All
Just one more finding. If I compile it as Win32 application, the same behaviour
occurred.
Can anyone advise what's wrong and the improvement ?
Regards
Antony
|
|
|
|
|
I need a working prototype for creating a connector between elements of a form without getting into Graphics.
Please let me know an algorith or a working prototype
Uday Denduluri
|
|
|
|
|
what do you mean with connector between elements ?
you want to link two controls by some means?
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
hi,
can anyone give me the naming conventions for variables in C#.
if anyone have please give me the list..
i'm just confused when going through the code, what is what in my code.
thanx,
nas
|
|
|
|
|
Googled:
http://msdn2.microsoft.com/en-us/library/ms229045.aspx[^]
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Naming Guidelines[^]
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
most important is that you stay consistant.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
I have a windows application through which i have to connect to oracle views
Initially for testing purposes i had made an access db and using oledb class connected and fetched data from access Database.
Now i have to connect to oracle views. Is there any way i can connect to the same views in oracle using my currently oledbconnection. Please specify other way if this is not possible. Please specify how to make my connection string.
Thanx in adv
Bye
|
|
|
|
|
type in google "connection strings" there is a site connectionsstrings.com or something that gives all the basic connectionsstrings for odbc, oledb etc. copy paste and fill in the correct data...
good luck.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
Hi all!
I don't know how to write a file to a remote shared folder, which has write permission to a user which isn't the one logged on Windows. I know the user & password of an user with write permissions, but I don't know how to authenticate.
What I want to do is the same that the next code in a bat file, but programmatically in C# (.NET 2.0):
net use \\192.168.1.5\shared_folder pwd /u:usr
copy c:\file.txt \\192.168.1.5\shared_folder\filecopy.txt
net use \\192.168.1.5\shared_folder /delete
Thanks all.
-- modified at 6:59 Thursday 25th January, 2007
|
|
|
|
|
I have to grant new permissions to folder on the machine using C# code
|
|
|
|
|
saurabh_bpl4 wrote: I have to grant new permissions to folder on the machine using C# code
Good for you. Did you just want to tell the world this, or did you want to ask a question?
|
|
|
|
|
|
|
|
Seeing as you've already had one post explaining how stupid your "question" was, I'll succumb and provide the answer: Google![^]
I have no idea what I just said. But my intentions were sincere.
Poore Design
|
|
|
|
|
My hero.
|
|
|
|
|
Hi
I developed a mobile application in c# for windows ce. Everytime the mobile device's batery is totally flat, it removes the application from the device and I have re-install it again (quite irritating). Now I've modified the registry with the following:
[HKEY_LOCAL_MACHINE\SOFTWARE\LXE\Persist\MyApp]
"Installed"=dword:00000001
"PCMCIA"=dword:00000000
"Delay"=dword:00000000
"FileName"="\System\MyApp.CAB
"FileCheck"="ALWAYSEXEC"
"Order"=dword:00000062
This automatically installs the application once the device enters windows (great). The problem now is when I remove the application manually from "Remove Programs", it doesn't only remove my application but it removes all the applications that are installed (except windows ce).
Is there something else I can do or make a change to my registry?
Thanks,
Dylan
|
|
|
|