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

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice