1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Meet and Greet' started by jotomau, Jun 28, 2011.

  1. jotomau

    jotomau New Member

    Jun 28, 2011
    Likes Received:
    Trophy Points:
    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
    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. :))

Share This Page