Solved

Error on fill datatable when deploying form to Windows Mobile Emulator

Posted on 2012-03-30
4
805 Views
Last Modified: 2013-12-27
Hi all,

Using Visual Studios 2008, .net 3.5, vb

I'm trying to deploy a form to a windows mobile emulator (and then device, of course). I've associated the combo boxes on the form with lookup tables. Yet everytime I try to debug, I get stopped with the following error at this line of code that VS is generating itself (full code block below):

Dim returnValue As Integer = Me.Adapter.Fill(dataTable)

I'm told that "The database file cannot be found. Check the path to the database. [ Data Source = \Program Files\VTCI_CEL1\SQL_CE_CEL5.sdf ]".

Do I need to drop the database onto the device first? But then how would I get the emulator to work?

Super new to all this, so I appreciate any and all advice.
Cheers,
Caitlin


        <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
         Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, True)> _
        Public Overridable Overloads Function Fill(ByVal dataTable As SQL_CE_CEL5DataSet.lkpiTreeDataTable) As Integer
            Me.Adapter.SelectCommand = Me.CommandCollection(0)
            If (Me.ClearBeforeFill = True) Then
                dataTable.Clear()
            End If
            Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
            Return returnValue
        End Function
0
Comment
Question by:RJT_VT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 37788275
Were is the database on the device?
0
 
LVL 48

Assisted Solution

by:Mikal613
Mikal613 earned 250 total points
ID: 37788278
You definitely need the database on the device:

Heres how:

http://www.smartmobiledevice.co.uk/HowTo/SetupStorageCardForEmulator
0
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 250 total points
ID: 37788298
alternatively, you could just start the emulator first and then even craddle it so it behaves like (well, nearly) read device => look for Device Emulator Manager uander Tools menu in VS.

you can also mark sdf (assuming it is included in your project) as 'Content' and choose to deploy it e.g. if it is newer than on the device/emulator
0
 

Author Closing Comment

by:RJT_VT
ID: 37789940
This beginner thanks you both for your advice! The two approaches have worked beautifully -- I've configured the shared folder and learned how to cradle the device beforehand.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question