Solved

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

Posted on 2011-03-10
2
1,322 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
2 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 500 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 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