Click here to Skip to main content
15,887,135 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to populate data in combobox gridview in VB.net? Pin
Richard MacCutchan5-Jun-16 21:24
mveRichard MacCutchan5-Jun-16 21:24 
QuestionDGV with multiple Tables Pin
Raabi Anony23-May-16 17:41
Raabi Anony23-May-16 17:41 
AnswerRe: DGV with multiple Tables Pin
Mycroft Holmes23-May-16 19:53
professionalMycroft Holmes23-May-16 19:53 
SuggestionRe: DGV with multiple Tables Pin
Richard Deeming24-May-16 1:34
mveRichard Deeming24-May-16 1:34 
GeneralRe: DGV with multiple Tables Pin
Mycroft Holmes24-May-16 12:38
professionalMycroft Holmes24-May-16 12:38 
AnswerRe: DGV with multiple Tables Pin
Richard Deeming24-May-16 1:41
mveRichard Deeming24-May-16 1:41 
GeneralRe: DGV with multiple Tables Pin
Raabi Anony24-May-16 16:06
Raabi Anony24-May-16 16:06 
GeneralRe: DGV with multiple Tables Pin
Raabi Anony25-May-16 0:41
Raabi Anony25-May-16 0:41 
Sorry for another show up with hope.
I am still stuck with the
VB
Dim conxnString As String = My.MySettings.sqlConnectionString

Or
VB
Dim conxnString As String = My.Settings.sqlConnectionString

VisualStudio 2015 says "sqlConnectionString is not a member of MySettings"
Do I need to Import some Library, other than System.Data.SqlClient ?
My whole code is as below:
VB
Private Function cboCampuses_SelectedValueChanged(sender As Object, e As EventArgs) Handles cboCampuses.SelectedValueChanged
       Dim selectedValue As String
       selectedValue = cboCampuses.SelectedValue
       Me.StaffEvaluationDGV.DataSource = GetDataSource(selectedValue)
   End Function

   Private Function GetDataSource(selectedValue) As DataTable
       Dim sqlSelect As String = "SELECT * FROM tblEvaln " &
          "WHERE CampusName = " & selectedValue

       Dim SqlConnection As SqlConnection
       Dim conxnString As String = My.MySettings.sqlConnectionString
       Try
           Dim table = New DataTable()
           Using con = New System.Data.SqlClient.SqlConnection(conxnString)
               con.Open()
               Using da = New System.Data.SqlClient.SqlDataAdapter(sqlSelect, con)
                   da.Fill(table)
                   Return table
               End Using
           End Using
       Catch ex As Exception
           ' Error message here
       End Try
   End Function

Would anybody help me please!
GeneralRe: DGV with multiple Tables Pin
Richard Deeming25-May-16 0:55
mveRichard Deeming25-May-16 0:55 
QuestionString or Binary Data Would be Truncated. The Statement has been Terminated Pin
kishore-201622-May-16 7:35
kishore-201622-May-16 7:35 
AnswerRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Sascha Lefèvre22-May-16 12:19
professionalSascha Lefèvre22-May-16 12:19 
QuestionRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Richard MacCutchan22-May-16 21:05
mveRichard MacCutchan22-May-16 21:05 
SuggestionRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Richard Deeming23-May-16 1:52
mveRichard Deeming23-May-16 1:52 
AnswerRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Member 1256155913-Jun-16 5:23
Member 1256155913-Jun-16 5:23 
QuestionHow we can retrieve Gridvalue Pin
MANISHA SONAWANE19-May-16 20:05
MANISHA SONAWANE19-May-16 20:05 
SuggestionRe: How we can retrieve Gridvalue Pin
Richard MacCutchan19-May-16 21:27
mveRichard MacCutchan19-May-16 21:27 
GeneralRe: How we can retrieve Gridvalue Pin
MANISHA SONAWANE19-May-16 22:06
MANISHA SONAWANE19-May-16 22:06 
QuestionRe: How we can retrieve Gridvalue Pin
Richard MacCutchan19-May-16 22:17
mveRichard MacCutchan19-May-16 22:17 
AnswerRe: How we can retrieve Gridvalue Pin
MANISHA SONAWANE19-May-16 23:02
MANISHA SONAWANE19-May-16 23:02 
QuestionRe: How we can retrieve Gridvalue Pin
Richard MacCutchan20-May-16 1:43
mveRichard MacCutchan20-May-16 1:43 
GeneralRe: How we can retrieve Gridvalue Pin
Eddy Vluggen20-May-16 2:53
professionalEddy Vluggen20-May-16 2:53 
QuestionError in MsHflexGrid for rowcolchange event Pin
srikrishnathanthri19-May-16 0:52
srikrishnathanthri19-May-16 0:52 
AnswerRe: Error in MsHflexGrid for rowcolchange event Pin
Eddy Vluggen19-May-16 4:35
professionalEddy Vluggen19-May-16 4:35 
AnswerRe: Error in MsHflexGrid for rowcolchange event Pin
Dave Kreskowiak19-May-16 5:40
mveDave Kreskowiak19-May-16 5:40 
GeneralI need your VB6 programs! Pin
DutchComputerKid13-May-16 6:55
DutchComputerKid13-May-16 6:55 

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.