?
Solved

windows mobile 6.5 vb.net application path and open data connection

Posted on 2011-03-10
2
Medium Priority
?
1,346 Views
Last Modified: 2013-12-27

conn = new sqlceconnection("Data Source=db.sdf")
conn.open()

Open in new window


gives an error
 question:
- how to know the path the application is run in?
- how to give the right path to the db file e.g. Mobile Device/program files/appname/db.sdf

conn = new sqlceconnection("Data Source=db.sdf")
conn.open()

Open in new window

0
Comment
Question by:IT-Factory
[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 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 2000 total points
ID: 35095181
Imports System.Reflection
...

Public Function GetAppPath() As String

Dim asm As [Assembly] = [Assembly].GetExecutingAssembly()

return System.IO.Path.GetDirectoryName(asm.GetName().CodeBase)

End Function
0
 
LVL 2

Author Closing Comment

by:IT-Factory
ID: 35095771
yep this is what i needed, thanks
very fast solution...
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

765 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