Click here to Skip to main content
14,543,895 members
   

C#

 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 5:56
Memberago248618-Mar-20 5:56 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 6:01
mveOriginalGriff18-Mar-20 6:01 
GeneralRe: problem retrieving info from one table to insert it into another Pin
Luc Pattyn18-Mar-20 6:04
sitebuilderLuc Pattyn18-Mar-20 6:04 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 6:11
mveOriginalGriff18-Mar-20 6:11 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 6:51
Memberago248618-Mar-20 6:51 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 6:57
Memberago248618-Mar-20 6:57 
GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 7:05
mveOriginalGriff18-Mar-20 7:05 
GeneralRe: problem retrieving info from one table to insert it into another Pin
ago248618-Mar-20 22:28
Memberago248618-Mar-20 22:28 
 
Hello sir and all my excuses for yesterday I had a connection problem that's why I disconnected but by dint of fighting all night I could find the solution regaré and tell me if the code is clean. I must say I am glad I did ...
Big Grin | :-D Big Grin | :-D Big Grin | :-D Big Grin | :-D

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

                      cmd1.CommandText = "INSERT INTO Commandes (montant_com) VALUES (@montant_com)";
                      cmd1.Parameters.AddWithValue("@montant_com", TxtTotalCmd.Text);
                      cmd1.ExecuteNonQuery();
                      OleDbCommand cmr = sql_con.CreateCommand();
                      cmr.CommandText = "SELECT @@IDENTITY AS LastId";


                      int LastId = Convert.ToInt32(cmr.ExecuteScalar());
                      TxtNunCmd.Text = LastId.ToString();
                      //sql_cmd = new OleDbCommand(CommandText, sql_con);


                  }

GeneralRe: problem retrieving info from one table to insert it into another Pin
OriginalGriff18-Mar-20 22:37
mveOriginalGriff18-Mar-20 22:37 
QuestionC# ATTNDACE Pin
villanueva bryan17-Mar-20 12:01
Membervillanueva bryan17-Mar-20 12:01 
AnswerRe: C# ATTNDACE Pin
OriginalGriff17-Mar-20 12:33
mveOriginalGriff17-Mar-20 12:33 
Questionproblem to retrieve an info in a sql request / problème pour recéper une info dans une requête sql Pin
ago248616-Mar-20 6:53
Memberago248616-Mar-20 6:53 
AnswerRe: problem to retrieve an info in a sql request / problème pour recéper une info dans une requête sql Pin
OriginalGriff16-Mar-20 6:59
mveOriginalGriff16-Mar-20 6:59 
GeneralRe: problem to retrieve an info in a sql request / problème pour recéper une info dans une requête sql Pin
ago248616-Mar-20 7:08
Memberago248616-Mar-20 7:08 
GeneralRe: problem to retrieve an info in a sql request / problème pour recéper une info dans une requête sql Pin
OriginalGriff16-Mar-20 7:10
mveOriginalGriff16-Mar-20 7:10 
GeneralRe: problem to retrieve an info in a sql request / problème pour recéper une info dans une requête sql Pin
ago248616-Mar-20 7:10
Memberago248616-Mar-20 7:10 
Generalrecording problem Pin
ago248617-Mar-20 0:47
Memberago248617-Mar-20 0:47 
GeneralRe: recording problem Pin
OriginalGriff17-Mar-20 1:24
mveOriginalGriff17-Mar-20 1:24 
GeneralRe: recording problem Pin
ago248617-Mar-20 2:07
Memberago248617-Mar-20 2:07 
GeneralRe: recording problem Pin
OriginalGriff17-Mar-20 2:13
mveOriginalGriff17-Mar-20 2:13 
GeneralRe: recording problem Pin
ago248617-Mar-20 2:21
Memberago248617-Mar-20 2:21 
GeneralRe: recording problem Pin
OriginalGriff17-Mar-20 2:34
mveOriginalGriff17-Mar-20 2:34 
GeneralRe: recording problem Pin
ago248617-Mar-20 2:40
Memberago248617-Mar-20 2:40 
GeneralRe: recording problem Pin
ago248617-Mar-20 2:43
Memberago248617-Mar-20 2:43 
GeneralRe: recording problem Pin
OriginalGriff17-Mar-20 2:51
mveOriginalGriff17-Mar-20 2:51 

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.