Click here to Skip to main content
15,886,724 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Setting Priorities for Pre-Requisites Pin
SPSandy21-Mar-14 7:47
SPSandy21-Mar-14 7:47 
AnswerRe: Setting Priorities for Pre-Requisites Pin
SPSandy20-Mar-14 4:27
SPSandy20-Mar-14 4:27 
QuestionVB6 Cennect with SQL Server Pin
Ardi Durres15-Mar-14 23:38
Ardi Durres15-Mar-14 23:38 
AnswerRe: VB6 Cennect with SQL Server Pin
Eddy Vluggen16-Mar-14 1:08
professionalEddy Vluggen16-Mar-14 1:08 
Questionchange connection with database on runtime Pin
alejx15-Mar-14 4:25
alejx15-Mar-14 4:25 
AnswerRe: change connection with database on runtime Pin
Dave Kreskowiak15-Mar-14 6:55
mveDave Kreskowiak15-Mar-14 6:55 
GeneralRe: change connection with database on runtime Pin
alejx15-Mar-14 8:03
alejx15-Mar-14 8:03 
GeneralRe: change connection with database on runtime Pin
Dave Kreskowiak15-Mar-14 10:01
mveDave Kreskowiak15-Mar-14 10:01 
This is simple string manipulation. In the app.config file, replace the database name in the connection string with a tag that's easily locatable, like this:
Server={SERVER};Database={DATABASENAME};User Id=myUsername;Password=myPassword;

* This connection string will only an example. Copying and pasting it will do you no good.

The tags, "{SERVER}" and "{DATABASENAME}" are easily found by code and replaced with a line like this:
Dim newConString As String = connStringTemplate.Replace("{SERVERNAME}", serverName).Replace("{DATABASENAME}", databaseName)


GeneralRe: change connection with database on runtime Pin
alejx15-Mar-14 11:29
alejx15-Mar-14 11:29 
GeneralRe: change connection with database on runtime Pin
Dave Kreskowiak15-Mar-14 12:11
mveDave Kreskowiak15-Mar-14 12:11 
GeneralRe: change connection with database on runtime Pin
alejx16-Mar-14 6:06
alejx16-Mar-14 6:06 
GeneralRe: change connection with database on runtime Pin
Dave Kreskowiak16-Mar-14 7:25
mveDave Kreskowiak16-Mar-14 7:25 
GeneralRe: change connection with database on runtime Pin
alejx16-Mar-14 8:35
alejx16-Mar-14 8:35 
GeneralRe: change connection with database on runtime Pin
Dave Kreskowiak16-Mar-14 14:15
mveDave Kreskowiak16-Mar-14 14:15 
GeneralRe: change connection with database on runtime Pin
alejx17-Mar-14 5:32
alejx17-Mar-14 5:32 
GeneralRe: change connection with database on runtime Pin
alejx18-Mar-14 4:56
alejx18-Mar-14 4:56 
GeneralRe: change connection with database on runtime Pin
Dave Kreskowiak18-Mar-14 5:44
mveDave Kreskowiak18-Mar-14 5:44 
GeneralRe: change connection with database on runtime Pin
alejx18-Mar-14 6:16
alejx18-Mar-14 6:16 
GeneralRe: change connection with database on runtime Pin
Dave Kreskowiak18-Mar-14 11:13
mveDave Kreskowiak18-Mar-14 11:13 
GeneralRe: change connection with database on runtime Pin
alejx18-Mar-14 12:50
alejx18-Mar-14 12:50 
GeneralRe: change connection with database on runtime Pin
Dave Kreskowiak18-Mar-14 13:31
mveDave Kreskowiak18-Mar-14 13:31 
GeneralRe: change connection with database on runtime Pin
alejx18-Mar-14 14:35
alejx18-Mar-14 14:35 
QuestionCopy scanned files Pin
Otekpo Emmanuel12-Mar-14 13:59
Otekpo Emmanuel12-Mar-14 13:59 
AnswerRe: Copy scanned files Pin
Rage12-Mar-14 22:19
professionalRage12-Mar-14 22:19 
QuestionURGENT HELP NEEDED : DB2 Connection failed in Visual Basic 6.0 Pin
Senthilkumar E10-Mar-14 8:33
Senthilkumar E10-Mar-14 8:33 

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.