Click here to Skip to main content
15,798,278 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to solve 100 Doors Kata using TDD in C# Pin
Bohdan Stupak19-Mar-20 6:12
professionalBohdan Stupak19-Mar-20 6:12 
Questionproblem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 4:13
ago248618-Mar-20 4:13 
AnswerRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 4:50
mvaOriginalGriff18-Mar-20 4:50 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 5:11
ago248618-Mar-20 5:11 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 5:17
mvaOriginalGriff18-Mar-20 5:17 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 5:24
ago248618-Mar-20 5:24 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 6:01
mvaOriginalGriff18-Mar-20 6:01 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 6:12
ago248618-Mar-20 6:12 
Ok my apologies, this is the error I get
System.Data.Oledb.Ole Exception (0x80040E14): Character found after the end of the Sql instruction


using (OleDbCommand cmd1 = sql_con.CreateCommand())
                   {

                       cmd1.CommandText = "INSERT INTO Commandes (montant_com) VALUES (@montant_com);" + "SELECT SCOPE_IDENTITY()";

                       int id;
                       cmd1.Parameters.AddWithValue("@montant_com", TxtTotalCmd.Text);

                       cmd1.ExecuteNonQuery();
                       id = (int)cmd1.ExecuteScalar();
                       TxtNunCmd.Text = id.ToString();

                   }

GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 6:13
mvaOriginalGriff18-Mar-20 6:13 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 6:16
mvaOriginalGriff18-Mar-20 6:16 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 6:30
ago248618-Mar-20 6:30 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 6:33
ago248618-Mar-20 6:33 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 6:39
mvaOriginalGriff18-Mar-20 6:39 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 6:42
ago248618-Mar-20 6:42 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 6:52
mvaOriginalGriff18-Mar-20 6:52 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 6:56
ago248618-Mar-20 6:56 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 7:01
mvaOriginalGriff18-Mar-20 7:01 
GeneralRe: problem retrieving info from one table to insert it into another Pin
Luc Pattyn18-Mar-20 7:04
sitebuilderLuc Pattyn18-Mar-20 7:04 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 7:11
mvaOriginalGriff18-Mar-20 7:11 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 7:51
ago248618-Mar-20 7:51 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 7:57
ago248618-Mar-20 7:57 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 8:05
mvaOriginalGriff18-Mar-20 8:05 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 23:28
ago248618-Mar-20 23:28 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 23:37
mvaOriginalGriff18-Mar-20 23:37 
QuestionC# ATTNDACE Pin
villanueva bryan17-Mar-20 13:01
villanueva bryan17-Mar-20 13:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.