Click here to Skip to main content
15,891,431 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionPublishing Database apps. Pin
The ANZAC24-Oct-07 14:07
The ANZAC24-Oct-07 14:07 
AnswerRe: Publishing Database apps. Pin
Tirthadip24-Oct-07 18:46
Tirthadip24-Oct-07 18:46 
GeneralRe: Publishing Database apps. Pin
The ANZAC24-Oct-07 20:46
The ANZAC24-Oct-07 20:46 
GeneralRe: Publishing Database apps. Pin
Dave Kreskowiak25-Oct-07 3:26
mveDave Kreskowiak25-Oct-07 3:26 
GeneralRe: Publishing Database apps. Pin
The ANZAC25-Oct-07 15:29
The ANZAC25-Oct-07 15:29 
GeneralRe: Publishing Database apps. Pin
Dave Kreskowiak26-Oct-07 1:50
mveDave Kreskowiak26-Oct-07 1:50 
GeneralRe: Publishing Database apps. Pin
The ANZAC26-Oct-07 2:41
The ANZAC26-Oct-07 2:41 
GeneralRe: Publishing Database apps. Pin
Dave Kreskowiak26-Oct-07 5:00
mveDave Kreskowiak26-Oct-07 5:00 
If you're installing SQLExpress, then all you need to do is put the .MDF file in the same folder as your executable, under the Program Files folder. The |DataDirectory| path of the connection string is automatically replaced with the path your .EXE was launched from. You don't have to do anything else to your installation. Nor do you have to do anything in your application or the connection string.

So, if your .EXE is launched from "C:\Program Files\MyCompany\MyApplication\app.exe", the |DataDirectory| replacement will get "C:\Program Files\MyCompany\MyApplication". This results in a connection string that looks like:
Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\MyCompany\MyApplication\PasswordManager.mdf;
    Integrated Security=True;Connect Timeout=30;User Instance=True




A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Publishing Database apps. Pin
The ANZAC26-Oct-07 5:05
The ANZAC26-Oct-07 5:05 
GeneralRe: Publishing Database apps. Pin
Dave Kreskowiak26-Oct-07 12:31
mveDave Kreskowiak26-Oct-07 12:31 
GeneralRe: Publishing Database apps. Pin
The ANZAC26-Oct-07 17:04
The ANZAC26-Oct-07 17:04 
GeneralRe: Publishing Database apps. Pin
Dave Kreskowiak26-Oct-07 18:11
mveDave Kreskowiak26-Oct-07 18:11 
QuestionVB.Net 2003 and Access database Web Services Client/Server Pin
kendo1724-Oct-07 13:26
kendo1724-Oct-07 13:26 
AnswerRe: VB.Net 2003 and Access database Web Services Client/Server Pin
Vimalsoft(Pty) Ltd24-Oct-07 20:54
professionalVimalsoft(Pty) Ltd24-Oct-07 20:54 
AnswerRe: VB.Net 2003 and Access database Web Services Client/Server Pin
Dave Kreskowiak25-Oct-07 3:27
mveDave Kreskowiak25-Oct-07 3:27 
GeneralRe: VB.Net 2003 and Access database Web Services Client/Server Pin
kendo1725-Oct-07 5:21
kendo1725-Oct-07 5:21 
GeneralRe: VB.Net 2003 and Access database Web Services Client/Server Pin
Dave Kreskowiak25-Oct-07 5:43
mveDave Kreskowiak25-Oct-07 5:43 
GeneralRe: VB.Net 2003 and Access database Web Services Client/Server Pin
kendo1725-Oct-07 6:10
kendo1725-Oct-07 6:10 
GeneralRe: VB.Net 2003 and Access database Web Services Client/Server Pin
Dave Kreskowiak25-Oct-07 6:28
mveDave Kreskowiak25-Oct-07 6:28 
GeneralRe: VB.Net 2003 and Access database Web Services Client/Server Pin
kendo1725-Oct-07 7:37
kendo1725-Oct-07 7:37 
GeneralRe: VB.Net 2003 and Access database Web Services Client/Server Pin
Dave Kreskowiak25-Oct-07 8:08
mveDave Kreskowiak25-Oct-07 8:08 
GeneralRe: VB.Net 2003 and Access database Web Services Client/Server Pin
kendo1725-Oct-07 14:04
kendo1725-Oct-07 14:04 
QuestionSystem.IO BinaryReader and Data Structures Pin
AAGTHosting24-Oct-07 8:51
AAGTHosting24-Oct-07 8:51 
AnswerRe: System.IO BinaryReader and Data Structures Pin
Dave Kreskowiak24-Oct-07 9:16
mveDave Kreskowiak24-Oct-07 9:16 
AnswerRe: System.IO BinaryReader and Data Structures Pin
dBrong24-Oct-07 9:24
dBrong24-Oct-07 9:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.