Solved

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

Posted on 2011-03-10
2
1,336 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 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Data organization issue 7 52
Copying from a network share 3 34
.NET Redemption/Outlook Examples 3 24
VB Catch Statement in Event Viewer. 2 14
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 …
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.
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

738 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