How can I specify the Server of my database when I make my project executable
I have this module I call everytime i modify my database
Public Sub main()
constr = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:"database file".mdf;" & _
"Integrated Security=True;Connect Timeout=30;User Instance=True"
Con = New SqlConnection(constr)
Try
Con.Open()
'MsgBox("Server Connection is Open ! ")
'frmMain.Connection.Text = "Connecting To serv``er"
Con.Close()
Catch ex As Exception
MsgBox("Sorry Can not open connection ! ", vbCritical, "Database")
End Try
End Sub
MY project will be installed on several computers. The database in integrated in my project
since i used Service-Based Database. Meaning when i copy the project to different computers,
the database always comes with it.
I'm thinking that when I will make an executable project, the database will be included.
How will I change the datasource above during installation of my project just to ensure that
there will be a single server for my database?
Thanks
Lethugs 8 Posting Whiz in Training
john.knapp 25 Posting Whiz in Training
Lethugs 8 Posting Whiz in Training
john.knapp 25 Posting Whiz in Training
Lethugs 8 Posting Whiz in Training
TnTinMN 418 Practically a Master Poster
john.knapp commented: <snippet>nice!</snippet> +3
Lethugs 8 Posting Whiz in Training
TnTinMN 418 Practically a Master Poster
john.knapp 25 Posting Whiz in Training
TnTinMN 418 Practically a Master Poster
john.knapp 25 Posting Whiz in Training
Lethugs 8 Posting Whiz in Training
Lethugs 8 Posting Whiz in Training
Lethugs 8 Posting Whiz in Training
john.knapp 25 Posting Whiz in Training
john.knapp 25 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.