Well I have build a program until now with an MySql database. The programs add records for the customers and the products of the company(Its works perfect).. I am trying to build now the Orders the last part of my project but I have a little problem.. First of all I need 4 different type of database:

Credit Card
Price Offer

This is the the type of the payment. The user must add the order by the payment of customer so we need to seperate each one.. Unitl here I am fine::

Now, my serious problem is with the order table:: If i used the code that I use for my other adding records (like product and customers ), for each order it's add only one product!! BasicallyI need to be able to add multi products and the user have the ability to change the price of one product:: for example "to make an offer for some special customers" without change data into the database of products... Thats has a lot of typing code but I need a base to start since I have a little bit of confused... At the end am trying to load data from database customers into text boxes:: for example the user select one name that loaded into a combobox and then appears the city and the mobile into a text boxes I build a code below but it's works only One type, actually fill the text boxes but after I clear all the boxes and try for a new customer or the same isn't fill anything. Below it's my code for fill text boxes please check it maybe you help me and just give me something to begin with the Order form..!!!

Dim ServerString As String = "Server=localhost;User Id=root;Password=root;Database=test"   ''Sting Server 
Dim SQLConnection As MySqlConnection = New MySqlConnection    ''SQL Connection
Dim Sql3 As MySqlCommand = New MySqlCommand("SELECT * FROM customers", SQLConnection)

 Sql3.CommandText = "Select City FROM customers"
        Sql3.Connection = SQLConnection
        Sql3.Parameters.AddWithValue("City", CustomerOrderCombo.SelectedValue)

        Dim obj As Object = Sql3.ExecuteScalar()

        If IsNothing(obj) Then
            TextBox2.Text = "Not Found"

            TextBox2.Text = obj.ToString()
        End If
5 Years
Discussion Span
Last Post by poolet25
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.