EPOS System, how do I do this????

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GeorgeE
    New Member
    • Nov 2007
    • 2

    EPOS System, how do I do this????

    Hey guys

    I have chosen to create an Epos system for my final yr project which doesnt seem to be one of the wisest decisions ive made.

    I am using Access to store all my data in the database and I am using vb.net 2005 as the GUI for the user.

    So far so good, i have created the connection between access and vb.net, a dataset and a data adapter.

    My aim is to enter the item Id number in a textbox, hit a button and all the details about the Id number will be retrieved from the database and appear in a data grid, such as description of item, price,......... ....

    I know this is possible but Im not sure exactly how to do this

    Thank you for your time

    George. E
  • daveftl
    New Member
    • Jan 2007
    • 43

    #2
    Originally posted by GeorgeE
    Hey guys

    I have chosen to create an Epos system for my final yr project which doesnt seem to be one of the wisest decisions ive made.

    I am using Access to store all my data in the database and I am using vb.net 2005 as the GUI for the user.

    So far so good, i have created the connection between access and vb.net, a dataset and a data adapter.

    My aim is to enter the item Id number in a textbox, hit a button and all the details about the Id number will be retrieved from the database and appear in a data grid, such as description of item, price,......... ....

    I know this is possible but Im not sure exactly how to do this

    Thank you for your time

    George. E

    use SQL command to do this,
    try this:

    "SELECT item_desc, item_price FROM Item WHERE item_ID =" &val(textbox.te xt)

    SELECT syntax: SELECT <table.column > FROM <table>

    hope this one helped you

    Comment

    • GeorgeE
      New Member
      • Nov 2007
      • 2

      #3
      Hey Dave,

      thanks for your response.

      Because Ive just started learning SQL im not sure how to implement it into vb.net.

      Do i put it in the form.vb view where the rest of the coding goes for the form?

      or do i put it in the adapter where the query builder is?

      Thanks again.

      Comment

      • daveftl
        New Member
        • Jan 2007
        • 43

        #4
        Originally posted by GeorgeE
        Hey Dave,

        thanks for your response.

        Because Ive just started learning SQL im not sure how to implement it into vb.net.

        Do i put it in the form.vb view where the rest of the coding goes for the form?

        or do i put it in the adapter where the query builder is?

        Thanks again.
        You can do both.. but I usually place it in my VB form code. I haven't used VB.NET but I think there is a lot of similarity to VB6 :)

        try this code:
        [CODE=vb]Public cn As New ADODB.Connectio n
        Dim rsItem As New ADODB.Recordset

        cn.ConnectionSt ring = "DSN=ftL_OD BC" 'this is my connection to my Database
        cn.Open

        With rsItemt

        .ActiveConnecti on = cn ' this is ur connection to the database
        .CursorLocation = adUseClient
        .CursorType = adOpenKeyset
        .LockType = adLockOptimisti c
        .Open "SELECT Item_number FROM Item WHERE Item_status = Available'"
        ' this SQL returns Item number whose status = "Available"

        End With

        Set dgrid.DataSourc e = rsItem ' set datagrid datasource[/CODE]
        This is in VB 6 and MySQL 5... but I think there will be less alteration for it to work in VB.NET

        God bless
        Last edited by Killer42; Nov 13 '07, 02:53 AM. Reason: Dave, please remember to use your CODE tags.

        Comment

        Working...