Click here to Skip to main content
15,907,329 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB - Looping Pin
Jughead323-Sep-16 3:10
Jughead323-Sep-16 3:10 
GeneralRe: VB - Looping Pin
Richard MacCutchan23-Sep-16 3:55
mveRichard MacCutchan23-Sep-16 3:55 
GeneralRe: VB - Looping Pin
Jughead323-Sep-16 11:04
Jughead323-Sep-16 11:04 
GeneralRe: VB - Looping Pin
Richard MacCutchan23-Sep-16 22:43
mveRichard MacCutchan23-Sep-16 22:43 
QuestionUse date format in my program independently from System date format Pin
desanti20-Sep-16 9:34
desanti20-Sep-16 9:34 
AnswerRe: Use date format in my program independently from System date format Pin
Bernhard Hiller20-Sep-16 20:58
Bernhard Hiller20-Sep-16 20:58 
AnswerRe: Use date format in my program independently from System date format Pin
Richard Deeming21-Sep-16 3:01
mveRichard Deeming21-Sep-16 3:01 
QuestionProblem with connectionstrings Pin
desanti20-Sep-16 6:30
desanti20-Sep-16 6:30 
Hello !
I'm using visual studio 2013.
In my app.config , there are 3 connections strings :
XML
<connectionStrings><add name="db1Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=PERSONALPC\MSSQL2008R2;initial catalog=db1;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
                     <add name="db2Entities" connectionString="metadata=res://*/Model2.csdl|res://*/Model2.ssdl|res://*/Model2.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=PERSONALPC\MSSQL2008R2;initial catalog=db2;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
                     <add name="db3Entities" connectionString="metadata=res://*/Model3.csdl|res://*/Model3.ssdl|res://*/Model3.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=PERSONALPC\MSSQL2008R2;initial catalog=db3;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>


Now , I want to access these connections strings , using the following code :
C#
Dim connstringtemplate1 As String = System.Configuration.ConfigurationManager.ConnectionStrings(1).ConnectionString.ToString

This string has "NULL" value
C#
Dim connstringtemplate2 As String = System.Configuration.ConfigurationManager.ConnectionStrings(2).ConnectionString.ToString

This string has the first connection string
C#
Dim connstringtemplate3 As String = System.Configuration.ConfigurationManager.ConnectionStrings(3).ConnectionString.ToString

This string has the second connection string
C#
Dim connstringtemplate4 As String = System.Configuration.ConfigurationManager.ConnectionStrings(4).ConnectionString.ToString

This string has the third connection string

Also if I use this :
C#
Dim nr As Integer = System.Configuration.ConfigurationManager.ConnectionStrings.Count

The value of nr is 5.

I have only 3 connection strings , so why there are 5 and the first is empty ?
This problem appear after I have installed the Update 5 on visual studio 2013.
Before everything was ok.
Thank you !
QuestionRe: Problem with connectionstrings Pin
Mathi Mani20-Sep-16 7:15
Mathi Mani20-Sep-16 7:15 
AnswerRe: Problem with connectionstrings Pin
ZurdoDev20-Sep-16 7:56
professionalZurdoDev20-Sep-16 7:56 
QuestionVisual Basic Pin
mariajohnson15-Sep-16 0:55
mariajohnson15-Sep-16 0:55 
QuestionRe: Visual Basic Pin
Richard MacCutchan15-Sep-16 1:42
mveRichard MacCutchan15-Sep-16 1:42 
AnswerRe: Visual Basic Pin
Tim Carmichael15-Sep-16 5:00
Tim Carmichael15-Sep-16 5:00 
QuestionVB6 app loses mojo - runs 3 times slower Pin
Dr Memory14-Sep-16 20:07
Dr Memory14-Sep-16 20:07 
AnswerRe: VB6 app loses mojo - runs 3 times slower Pin
Mycroft Holmes16-Sep-16 13:31
professionalMycroft Holmes16-Sep-16 13:31 
GeneralRe: VB6 app loses mojo - runs 3 times slower Pin
Dr Memory16-Sep-16 19:22
Dr Memory16-Sep-16 19:22 
GeneralRe: VB6 app loses mojo - runs 3 times slower Pin
Dave Kreskowiak17-Sep-16 4:00
mveDave Kreskowiak17-Sep-16 4:00 
GeneralRe: VB6 app loses mojo - runs 3 times slower Pin
Mycroft Holmes17-Sep-16 11:16
professionalMycroft Holmes17-Sep-16 11:16 
RantRe: VB6 app loses mojo - runs 3 times slower Pin
Dr Memory17-Sep-16 11:40
Dr Memory17-Sep-16 11:40 
GeneralRe: VB6 app loses mojo - runs 3 times slower Pin
Eddy Vluggen18-Sep-16 0:57
professionalEddy Vluggen18-Sep-16 0:57 
AnswerRecord not Display in Datagridview1 Pin
Computechsoft14-Sep-16 5:03
Computechsoft14-Sep-16 5:03 
QuestionPanel in a Form loses contents Pin
Hurricane300011-Sep-16 7:57
Hurricane300011-Sep-16 7:57 
AnswerRe: Panel in a Form loses contents Pin
Eddy Vluggen11-Sep-16 10:09
professionalEddy Vluggen11-Sep-16 10:09 
GeneralRe: Panel in a Form loses contents Pin
Hurricane300011-Sep-16 10:45
Hurricane300011-Sep-16 10:45 
GeneralRe: Panel in a Form loses contents Pin
Dave Kreskowiak11-Sep-16 11:06
mveDave Kreskowiak11-Sep-16 11:06 

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.