hello guys! we have a big problem in our database.
When we input values, and retrieve them in forms,
we can see them. but when we look directly into our database, we can't see it.

What is the possible problem? here is our codes to add values.

Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click
If ClassName.Text = "" Then
MsgBox("Please type the Class Name", MsgBoxStyle.Information)
Else
Dim obj As New DBClass
Dim sql As String
sql = "Insert into tblClass(ClassName) values('" & ClassName.Text & "')"
obj.RunInsertDeleteUpdateQry(sql)
RefreshGrid()
ClassName.Clear()
End If
End Sub

After inserting the records did you try running ur statement on database like
Select * from tblClass?

That you dont have two databases? So, inserting on one, and looking into the other? It might occur this (at least I have a couple of issues with it).

1. Try adding a try catch statement in your code in order to get all possible errors. (also try posting the function that runs the sql query in order for us to help you- maybe that function rolls back)
2. how are you trying to see the database. through your program or directly from the database server. if you are using the server you know that you should refresh the table every time you insert or update something for that to be displayed.
3. if you have two databases and you insert in one of the and the look in the other one of course the data won't be there because you have inserted them to the other database.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.