Results 1 to 2 of 2

Thread: How To Refresh/Refresh Tables in Database

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2019
    Posts
    2

    Question How To Refresh/Refresh Tables in Database

    Working on Computer Based Test (CBT) which has two interface, teacher's login where they set questions, edit and update questions, delete questions and as well create subject. The other interface is the student corner where they answer questions set by teachers, question marked and score...

    On the teacher's question create section, I have a textbox called TEACHERQUST.txtNewSUBJECT_Ts2.Text, and a button (btnCreate).
    Please I need a clear code to my sub (NEWSubFORM), whenever any subject is created, my database to reload/refresh in order to be detected by my form without closing the application.

    I did this on my module...

    Public Sub NEWSubFORM()

    Dim NewSubFORM, sqlSF As String
    Dim dsNew As New DataSet()

    NewSubFORM = TEACHERQUST.txtNewSUBJECT_Ts2.Text

    If NewSubFORM = "" Then
    Exit Sub
    Else
    sqlSF = "select * from " & NewSubFORM
    da = New OleDb.OleDbDataAdapter(sqlSF, con)
    da.Fill(dsNew, NewSubFORM)

    Dim NewTable As String
    Dim sqlNT As String

    NewTable = NewSubFORM
    sqlNT = "select * from " & NewTable
    da = New OleDb.OleDbDataAdapter(sqlNT, con)
    da.Fill(ds, NewTable)
    End If

    End Sub



    thanks in advance!
    Attached Images Attached Images  

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2019
    Posts
    2

    Re: How To Refresh/Refresh Tables in Database

    i have it solved, so don't bother yourself...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width