Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Problem with transferring a large data to SQL Serv

Author  Topic 

msd1357
Starting Member

3 Posts

Posted - 2009-07-19 : 01:04:22
Hi
I develop an application with Visual Studio 2008 on a Windows Mobile 5 Device. In my application I need to transfer my local data to SQL Server 2005 via WiFi network. I do this scenario:
1. Make a well formed dataset on the device which contains about 4 tables.
2. Call a Stored Procedure from central server and pass my dataset as XML data type (as string format) to a stored procedure on server.
At the first glance everything works fine and I can pass dataset (as string type) to SQL Server and parse it at server side and read every 4 tables data without any problem. But when the capacity of the dataset exceed than a specific size (I thing 3 or 4 kilo bytes) I take an exception on my device when the program tries to send data to SQ Server 2005. This is the Exception that occurred:

--Message :
SqlException
--StackTrace :
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, TdsParserState state)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior run, SqlCommand cmdHandler, SqlDataReader dataStream)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at DataAccessLayer.DAL.Select(String StoredProcedureName, List`1 parameter)
at Niloofar.frmTransferDataToServer.mnuTransfer_Click(Object sender, EventArgs e)
at Niloofar.frmTransferDataToServer.btnTransfer_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.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
at Microsoft.AGL.Forms.EVL.EnterModalDialog(IntPtr hwnModal)
at System.Windows.Forms.Form.ShowDialog()
at CommonComponent.frmParent.ShowForm(Form frm)
at Niloofar.frmMain.mnuTransferToServer_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.Menu.ProcessMnuProc(Control ctlThis, WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Form.WnProc(WM wm, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
at System.Windows.Forms.Application.Run(Form fm)
at Niloofar.Program.Main()

I wrote the same code in a simple windows application and it works fine with the same large dataset.
I'm very confused about this problem. Anybody could help me please?
Regards…

Jeff Moden
Aged Yak Warrior

652 Posts

Posted - 2009-07-19 : 18:19:03
Why not make a well formed tab delimited file and avoid all the problems you're having with shredding XML? ;-)


--Jeff Moden
"Your lack of planning DOES constitute an emergency on my part... SO PLAN BETTER! "
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row"

Go to Top of Page
   

- Advertisement -