Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


database changing bindingsource at runtime


database changing bindingsource at runtime

Author
Message
timark2000
timark2000
Forum God
Forum God (1.2K reputation)Forum God (1.2K reputation)Forum God (1.2K reputation)Forum God (1.2K reputation)Forum God (1.2K reputation)Forum God (1.2K reputation)Forum God (1.2K reputation)Forum God (1.2K reputation)Forum God (1.2K reputation)

Group: Forum Members
Posts: 5, Visits: 31
 HAVE ASSOCIATED A MICROSOFT ACCESS DATABASE TO A FORM USING A DATASET/BINDINGSOURCE/DATAVIEWGRID/BINDINGNAVIGATOR

EACH TIME A DIFFERENT STUDENT APPEARS AFTER USING THE BINDINGNAVIGATOR IT IS NECESSARY FOR THE PROGRAM TO LIST CLASSTIME FOR THIS STUDENT IN A NEW DATAVIEWGRID. FOR THIS I HAVE ADDED A DATASET/BINDINGSOURCE/DATAVIEWGRID

I HAVE A SUB AS FOLLOWS:-

Private Sub RefreshClassTime()

Dim sQuery As String = ""

SQuery = "SELECT [Description],[Lesson], [Location], [StudentID], [CourseCode] From [ClassTime] Where ((([StudentID]) = " & Val(txtStudentID.Text) & ")) And (([CourseCode]) = " & Val(txtCourseCode.Text) & ") ORDER BY [Description];"

BindingSource_Classtime.DataSource = SQUERY

End Sub

Using this code is not working as just assigning the squery to the bindingsouce_classtime.datasource is NOT WORKING

Can anybody help me with this problem. I am new to vb.net

Thank you in anticipation


GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search