Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

I am facing a problem in my application. This occurs when I synchronize data from one sql server to another via internet.

 

The problem is only faced on Windows 98, ME and some versions of XP.

It works perfectly on Windows 2000 computers.

 

The Error occurs on the statement myDataadapter.Fill(myDataset,"myDatatable")

Just for debugging i tried reducing the number of rows to be imported and the same codes ran fine but when the number of rows increased to 2000, (with almost 50 columns) then it gives the error.

 

what i am doing is when the user clicks on Synchronize button, it synchronizes with the remote server and my code run's like this

 

btnSynch.click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSynch.Click

 

conn.Open()

trans = conn.BeginTransaction()

Try

table1() ' Synchronizes table 1

table2() ' Synchronizes table 2

table3() ' Synchronizes table 3

 

Catch oExcept As Exception

trans.Rollback()

MsgBox(oExcept.Message)

End Try

 

and in these individual functions i have written all the codes for synchronization.

but in win98 & ME it is not even catching the error that has occured and gives Unhandled Exception message.

Shouldn't it catch the exception occured in the functions too ???

 

The Exception That I recieve is

"This SqlTransaction has completed; it is no longer usable"

Details :

System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.

at System.Data.SqlClient.SqlTransaction.Rollback()

at MyProject.frmsynch.btnSynch_Click(Object sender, EventArgs e)

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.PerformClick()

at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)

at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)

at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)

at System.Windows.Forms.Control.PreProcessMessage(Message& msg)

at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)

 

And when i wrote the Try catch method in the table1() function, it gave me the Error

"General Network Error. Please check your Netwok documentation."

 

Please Help.

 

Thanking You all

and awaiting a prompt reply

l@kk@dgh@t

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...