.net - Background Worker is not Working With Oracle Connection -


I have a strange problem that I want to get from Oracle (online DB) and update and update MySQL database which is the offline database. That's if a failure starts mysql database function. I have to update main records from Myacle to Oracle so that if the offline database starts in the game, then it will have all the relevant synchronized data in it.

I have written the code with the background worker class so that I can keep it in a different thread please follow the code

code

  Oracle Using DataAccess.Client; Using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Linq; Using System.Text; Using System.Threading; Using System.Windows; Using System.Windows.Controls; Using System.Windows.Data; Using System.Windows.Documents; Using System.Windows.Input; System.Windows.Media; System.Windows.Media Using imaging; Using System.Windows.Shapes; Using System.Data.EntityClient; Using System.Data; Nameshal Hospital System {/// & lt; Summary & gt; /// Interaction Logic for HospitalSync.xaml /// & lt; / Summary & gt; Public Partial Class Hospital Sink: Window {Public Background Worker; Public intelligence total records; Public Hospital Sink () {InitializeComponent (); } Calculate the public int percent (int current) {int percent = (int) (current / total records) * 100; Return percentage; } Public Zero SyncDataFromKPT (Object Sender, DoWorkEventArgs E) {MedEntities DB = New MedEntities (); (OracleConnection Connection = Using new Oracle Connection (DB. Database Connection. Connection String)) {Datatable Records Option DataTable = New DataTable (); String SqlCommand = "SELECT * fROM medsec.vu_registration_modify"; (Oracle Commands CMD = Using New Oracle Commands (SQL Commands, Connection)) (OracleDataAdapter Adapter = New Oracleadata Adapter (SQL Commands, Connection); Adapter. Select Commands. Type = Command Type; Text; Adapter. Fill (RecordsToUpdateTable); if (RecordsoutUpdate daily.Count> 0) {For (J.J. = 0; J & lt; = RecordsTodet table.ROS.Count; J ++) {Ricketttool.content = J + 1 ; CalculatePercentage (J);}}}}} Public Null Process Processed (Object Sender, Progress Moving Event ARG E) {UpdateBar.Value = e.progressPercentage;} Public Zero Initial Worker () {worker = new backgroundworker}; worker. Worker report progress = true; Worker.DoWork + = New DoWorkEventHandler (SyncDataFromKPT); worker by changing progress + = new progress changing event handler (complete process); Worker.RunWorkerAsync (worker);} Private Zero Button_Click_1 (Object Sender, RoutedEventArgs e) {InitializeWorker (); }}}  

At this point MedEntities DB = new MedEntities (); This code does not execute after using the block even if I breakpoint

Please guide me how to do the code function

This question is @ Marcus Thanks to the help of thanksgiving

This was the issue of platform I was using 32bit client library and debugging at 64 bit.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -