[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error on fill datatable when deploying form to Windows Mobile Emulator

Posted on 2012-03-30
4
Medium Priority
?
847 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 1000 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 1000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month18 days, 13 hours left to enroll

834 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