Solved

Error on fill datatable when deploying form to Windows Mobile Emulator

Posted on 2012-03-30
4
784 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
  • 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Complex SQL script 1 32
How to SQL Trace a SPECIFIC query 24 60
Help with Syntax 9 29
SQL Query Conversion of IIF statement into CASE - Syntax issue 17 33
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now