Search results for query: *

  1. codify

    Answered Setting primary key in windows form

    So I have got the solution guys! In SQL management studio once you have made a table, and you forget to set primary key, then you cannot modify it in future to set a primary key. It is mandatory for you to set the primary key when you are creating the table. So its was not saving my new primary...
  2. codify

    Answered Setting primary key in windows form

    Hello! I am have connected SQL management studio with my visual studio where I am making this hospital management system. I have set the PATIENT ID as the primary key in the SQL management studio. But when I am entering duplicate id, there is no objection being made by the code. What should I do...
  3. codify

    Storring wrong data in a text box!

    Hello! In a window form, Patient id is being stored in both text box1 and textbox2. It is not storing the name of the patient in textbox2. Please help! private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(@"Data...
  4. codify

    Resolved SqlException: 'Invalid column name 'id'.

    @Sheepings @Skydiver Thanks! I figured it out! I was adding the column in the query but was not refreshing the table after adding the "id column" in SQL management studio!
  5. codify

    Resolved SqlException: 'Invalid column name 'id'.

    I am making a window form database management system. When I click on the "Add staff" option, this error occurs System.Data.SqlClient.SqlException: 'Invalid column name 'id'.' on line number : 20 private void StaffInformation_Load(object sender, EventArgs e) { // TODO: This...
  6. codify

    Question Project not opening on visual 2019

    @Skydiver Thanks a lot brother! It worked!
  7. codify

    Question Project not opening on visual 2019

    Alright! I saw the new option of clone project in visual 2019. And it pulled the project easily. But still build option is not available.
  8. codify

    Question Project not opening on visual 2019

    So what should I do??
  9. codify

    Question Project not opening on visual 2019

    Hello! I am trying to open this project. It should automatically open the rest of cs files which are linked to it. But when I open it my visual screen is blank.
  10. codify

    'Incorrect syntax near the keyword 'into' in button code of webform

    SOLVED! I JUST HAD TO REMOVE INTO! BECAUSE IT IS WRONG SYNTAX WHEN IT COMES TO UPDATE QUERRY. Thanks!
  11. codify

    'Incorrect syntax near the keyword 'into' in button code of webform

    So this is the update button code of my webform. Its giving this error at "comm.ExecuteNonQuery();" . How ever button1 which had insert operation showed no error with this. protected void Button2_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data...
  12. codify

    Question implement the crud operations?

    SqlCommand cmd = new SqlCommand("INSERT INTO Patient_basicinfo Values(@PatientCnic,@PatientContact,@PatientAddress,@Patientname,@Patientage)", con); What's wrong with this? I have written the same thing as mentioned in the video at 13:00. I don't know how to list the column names. The column...
  13. codify

    Question implement the crud operations?

    The main thing to find out is that the issue is in the c# code or in the SQL studio!
  14. codify

    Question implement the crud operations?

    I am not getting what the guys at stack overflow are saying as i am very new to c#. using System; using System.Windows.Forms; using System.Data.SqlClient; using System.Data; namespace CRUDAPP { public partial class Form1 : Form { public Form1() {...
  15. codify

    Question implement the crud operations?

    Removed the last line, executed the query. Still same error! ?
  16. codify

    Question implement the crud operations?

    Can anyone come on team viewer to sort this issue?
  17. codify

    Question implement the crud operations?

    Initially, the same error "An explicit value for the identity column in table 'Patient_basicinfo' can only be specified when a column list is used and IDENTITY_INSERT is ON." was occurring in the SQL studio but then I used the "SET IDENTITY_INSERT Patient_basicinfo ON/OFF"! By this, the query...
  18. codify

    Question implement the crud operations?

    Hye, everyone. So I am following this video to implement the crud operations using c#. I had a discussing here too and I did the changes as they said! Still, the error is there! Please help me!
Back
Top Bottom