locked
How do i connect my website using visual studio to SQL server management? RRS feed

  • Question

  • User1938579050 posted

    I want to make a registration system, where the registered names are stored on the database and if you choose a name already taken, an error message pops up. Also, i want to be able to book tennis courts where if the same court/venues are chosen, an error message pops up for this as well. But I'm not quite sure how to do this, or if I've even set up my SQL server management properly... I haven't set up any foreign keys, which i think i need to do, and I'm not sure if my primary keys are properly set up as well.

    It'd be so much easier if we could get on discord or something and talk over it quickly but that's asking for too much (i'd be willing to pay if it takes time, but works and functions as I've described)

    Thanks.

    Thursday, January 2, 2020 1:51 AM

Answers

All replies

  • User-719153870 posted

    Hi Joe_p123,

    i want to be able to book tennis courts where if the same court/venues are chosen, an error message pops up for this as well.

    It's very easy to achieve, the whole point is to check if there's already a same court/venues is chosen. Let's assume this "be chosen" is a status field of the court/venues table in your database, then do like "select count(courtid) from courttable where status = 'chosen'", in this statement, if the query result returns value larger than 0 then it means there's already a same court/venues is chosen.

    In addition, if you set the courtid or courtname as the primary key, then the field data must be unique which means that whenever you want to insert a new record with the same courtid or courname into your table, it will throw error, use try catch and you can alert your customer if there's already a court/venues record in your database.

    For more information, you can refer to How to check If record Exist in the Database.

    Hope this could help.

    Best Regard,

    Yang Shen

    Thursday, January 2, 2020 3:13 AM
  • User379720387 posted

    You can use any of the free templates which microsoft provides that come with sql integration.

    You may not need a relational database like SQL, provided you stick to a very narrow scope of the actual booking functionality.

    I can give you a few minutes of my time on discord.

    Friday, January 3, 2020 1:32 PM
  • User1938579050 posted

    You can use any of the free templates which microsoft provides that come with sql integration.

    You may not need a relational database like SQL, provided you stick to a very narrow scope of the actual booking functionality.

    I can give you a few minutes of my time on discord.

    whats your discord name?

    Friday, January 3, 2020 9:30 PM
  • User1938579050 posted

    Hi Joe_p123,

    Joe_p123

    i want to be able to book tennis courts where if the same court/venues are chosen, an error message pops up for this as well.

    It's very easy to achieve, the whole point is to check if there's already a same court/venues is chosen. Let's assume this "be chosen" is a status field of the court/venues table in your database, then do like "select count(courtid) from courttable where status = 'chosen'", in this statement, if the query result returns value larger than 0 then it means there's already a same court/venues is chosen.

    In addition, if you set the courtid or courtname as the primary key, then the field data must be unique which means that whenever you want to insert a new record with the same courtid or courname into your table, it will throw error, use try catch and you can alert your customer if there's already a court/venues record in your database.

    For more information, you can refer to How to check If record Exist in the Database.

    Hope this could help.

    Best Regard,

    Yang Shen

    do you have discord or skype where you can help me further please?

    Sunday, January 5, 2020 12:49 AM
  • User-719153870 posted

    Hi Joe_p123,

    Sorry we are not supposed to share other personal information here.

    If you have further questions related to this thread, please post them here in this thread. Or if you have other questions, you can ask them in new threads and the community will help.

    Best Regard,

    Yang Shen

    Monday, January 6, 2020 1:28 AM
  • User1938579050 posted

    Yang Shen

    Hi Joe_p123,

    Sorry we are not supposed to share other personal information here.

    If you have further questions related to this thread, please post them here in this thread. Or if you have other questions, you can ask them in new threads and the community will help.

    Best Regard,

    Yang Shen

    I really need help, and the long replies aren't really good because i'm supposed to have this done in 4 days :(

    Monday, January 6, 2020 1:54 AM
  • User-719153870 posted

    Hi Joe_p123,

    Maybe you can try open support ticket at https://support.microsoft.com/en-us/supportforbusiness/productselection.

    Best Regard,

    Yang Shen

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 6, 2020 5:46 AM