locked
how can i insert the following data in northwind database command is required RRS feed

  • Question

  • hi how can i insert the following data in northwind database sqlserver command require

    Company Name                   |Order ID|   Product Name   | Unit price  |  Employee Name

    Anzar and Bros                   | 831      |    Apple               |    10         |  Khawaja



    MUHAMMAD ANZAR E-mail : muhammadanzar@hotmail.com Mobile # :0092-3215096959

    Wednesday, January 30, 2019 6:36 PM

All replies

  • Hello,

    The standard relationship model encompasses several tables so what you have looks like one table unless I'm missing something.

    • Employee name is in Employees table tied to Orders by primary key not a single string.
    • Same for product.

    Perhaps some clarification on your part would be helpful.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, January 30, 2019 8:08 PM
  • i tried but i can not do this kindly give me the sql server  statement .  and when ever i forget to enter the  employee name vb.net give me error.  tell if i send null value from vb.net to database and do not produce error.

    in vb.net i write code in try catch.  i call a function inside other function when ever any error create give the catch message from each function.  i want only sing time catch give me an error.


    MUHAMMAD ANZAR E-mail : muhammadanzar@hotmail.com Mobile # :0092-3215096959

    Wednesday, February 6, 2019 3:50 PM
    • In regards to forgetting to provide an employee name, that is what assertion is about, to assert data that is expect is provided.
    • In regards to null value, that is dependent on the definition of the field in the actual database table.
    • What you mentioned about try/catch, sound like you have not grasped how to properly use assertion and this is not the place to dig into this as it can get complex and length.

    Until you have a better understanding of how to code nothing I can provide will help you learn only assist in brute force success of the task at hand.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, February 6, 2019 3:57 PM