954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Values are seen on forms but not on database

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
mitchiexlolz
Newbie Poster
15 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

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

Pgmer
Master Poster
714 posts since Apr 2008
Reputation Points: 54
Solved Threads: 121
 

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).

Mitja Bonca
Nearly a Posting Maven
2,485 posts since May 2009
Reputation Points: 641
Solved Threads: 474
 

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.

Mariandi
Light Poster
43 posts since Nov 2009
Reputation Points: 22
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: