Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Meet and Greet (http://www.go4expert.com/community/meet-and-greet/)
-   -   HELP: Im developing a POS for a pharmacy and im using VS2010 and MSACCESS 2010 (http://www.go4expert.com/community/help-im-developing-pos-pharmacy-im-t26160/)

jotomau 28Jun2011 11:43

HELP: Im developing a POS for a pharmacy and im using VS2010 and MSACCESS 2010
 
Hello guys,

Can someone give me an example of any related issues regarding with my problem. I cannot Update my tables using vb in vs 2010to access 2010. I use the code :

x = Val(txtProductID.Text)
MyDB.UpdtS("UPDATE Products SET ProductName='" & txtProductName.Text & "',Price='" & txtPrice.Text & "',Description='" & txtdesc.Text & "' WHERE ProductID='" & x & "'")
MessageBox.Show("Product has been Updated!")

I have a class name MyDB:

Public Shared Function UpdtS(ByVal qry As String) As Boolean

Dim cmd As New OleDbCommand
cmd.Connection = Connect
cmd.CommandText = qry
Try
cmd.ExecuteNonQuery()
Return True

Catch ex As Exception
Return False


End Try

End Function

and another thing, i have also a problem in my print out. i need a code for the printing my reciept! :))
Thank you for reading and please reply. :))


All times are GMT +5.5. The time now is 18:24.