vb dot net query

P

premtolani

hi,
I want to connect vb dot net to sql server but i want to use the
application path. I dont want to change the path every time in the
code. Please let me know how to do it in visual basic dot net.


regards,
Prem
 
G

Ginny Caughey MVP

Prem,

This newsgroup is for questions about the Compact Framework, so I'm assuming
you mean SQL Server Compact rather than SQL Server. You can get the app path
from
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top