Solved

Error on fill datatable when deploying form to Windows Mobile Emulator

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
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 …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

772 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