sql server

  1. Omer Butt

    Resolved Is it possible to retain auto increment even after deleting a tuple from a datagridview

    I want to ask if there is any possibility to retain the Auto Increment Primary Key Numbers after deleting a record. For Example there are 5 records save in a table if I delete a tuple ID 3 by clicking on a delete button from a datagridview it shows the ID sequence retained as 1,2,3,4 instead of...
  2. S

    Hi guys just have a question regarding parameterized queries.

    Initially I was concatenating my SQL queries, i was then informed that it would be best to use parameterized queries to prevent SQL Injection. I've now done that and everything works fine, however when posting on a forum yesterday about one of my queries not working properly, a person told me...
  3. S

    Storing values from a single column within a list.

    I would like to read all of the values from the column name "seatNo" and store those values within a list. I've done most of the code but i have absolutely no idea how to actually store the values Here is what i have so far: private List<string> seatNumbers = new List<string>()...
  4. S

    Resolved Accessing an individual value within a list

    I have a sign in method, which stores the details of a user based on the password and email that they enter. Within this method i call a function which stores those details inside of a list. My question is how would i be able to access those individual values? I want to be able to access just...
  5. S

    Resolved Getting error message regarding a foreign key when inserting data into a table.

    When signing up data will be stored within two tables. customerLogin and customer. The code for this is shown below, it works the way i want it to, inserting the correct details into both tables. { string query_1 = "Insert into customer (firstName...
  6. S

    Need some assistance with parameterized queries in visual studio.

    I'm trying to execute the following query, but its throwing an exception "Must declare the scalar variable \@dateFrom\ "." Does anyone maybe know why this is occurring? the dataType for dateOfDeparture is date. when i was using concatenation i was providing the format of the date...
  7. S

    Resolved Attempting to fill text boxes in user control once the user has logged in

    When the user logs in they will be taken to a dashboard where they can select different options. one of them being "Account details". within this user control I've set up text boxes which will be filled with the users details once they double click on the row within the DataGridView . I have...
  8. S

    Resolved how to transfer data from one grid view to a text box in another user control

    When the user double clicks on one of the bookings within the grid view, i would like to transfer the Id to a text box in a separate user control. Any ideas of how could I achieve this? Thankyou private void availableBookings_CellDoubleClick(object sender, DataGridViewCellEventArgs e)...
  9. mkhurram92

    SqlTransaction in C# issue

    Hi Everyone, I have a method which is storing values in database and after that it is print invoice. I'm printing a form for invoice printing. I want to make sure that if it's saving it should print. Otherwise rollback all chanages. Following is syntex of the method. private...
  10. 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!
  11. alti

    Answered Conversions from c# to odbc sql server

    hello , im having a problem converting from datetime c# to datetime sql server using odbc and time c# to time(7) sql server this is my code: command.CommandText = "INSERT INTO pointer (Nom_employe, Date_Heure , Matin, Midi, apresmidi, Soir) VALUES ( ? ,? , ? , ?, ?, ?);"; //...
  12. G

    Trying to understand the database in visual studio

    Hi, I am trying to learn database management system that exists in my company. I am new to this. So there are things that I have understood so far. I want to know what I understood is correct or not. So there is this Database which when I checked in Visual studio is of type Microsoft Sql...
  13. R

    Question display dynamic Database relational schema

    im working on making an automatic OLAP cube with C# i need little help how to display an relational database schema (the database is taking from the SQL server )
  14. H

    Question How to call stored procedure with linq connection string?

    My problem is I use linq with connection string instead of dbml file, so stored procedure don't show in intellisense. Is there any way to call stored procedure with linq connection string? Thanks you!
  15. S

    Question How to call a stored procedure in a method to get the result in an array list?

    I need to call a stored procedure in one method to get the data and display it in one column of html table. the rest of columns are displayed by another methods and actionresults. (it's a mvc repository application). right now I can show the result of stored procedure in grideview, each column...
  16. B

    Tip Backup and restore Sql Server database

    This article explains how to Backup and restore Sql Server database using C# step by step Backup and Restore Sql Server database in C# - FreeLearningDz
Top Bottom