Click here to Skip to main content
15,915,019 members
Home / Discussions / C#
   

C#

 
GeneralDatagrid with textbox Pin
marck.santos22-Dec-04 15:15
marck.santos22-Dec-04 15:15 
GeneralRe: Datagrid with textbox Pin
Heath Stewart22-Dec-04 19:33
protectorHeath Stewart22-Dec-04 19:33 
GeneralPassing Value Types by Reference Pin
paulsawyer22-Dec-04 15:00
paulsawyer22-Dec-04 15:00 
GeneralRe: Passing Value Types by Reference Pin
Heath Stewart22-Dec-04 19:17
protectorHeath Stewart22-Dec-04 19:17 
GeneralRe: Passing Value Types by Reference Pin
Salil Khedkar22-Dec-04 19:20
Salil Khedkar22-Dec-04 19:20 
GeneralProblem with Stored Procedure Pin
ronin177022-Dec-04 14:29
ronin177022-Dec-04 14:29 
GeneralRe: Problem with Stored Procedure Pin
Javier Lozano22-Dec-04 18:36
Javier Lozano22-Dec-04 18:36 
Generalproblem auto increment field Pin
Gedrain22-Dec-04 13:30
Gedrain22-Dec-04 13:30 
hello,

i have the table brands with 2 columns brand_id and name. I'm creating a new row in my dataset in the table brands after i added the new row i need to update the database that is no problem but the auto increment number that is created for example brand_id: 11
i need that number. The database where the data is stored in is a firebird database.

DataRow drBrand = dS.Tables["brands"].NewRow();
drBrand["name"] = "new brand";
dS.Tables["brands"].Rows.Add(drBrand);

adapterBrands.InsertCommand.Transaction = connection.BeginTransaction();
adapterBrands.Update(dS.GetChanges(), "brands");
adapterBrands.InsertCommand.Transaction.Commit();

So what i want is: I create a new row in the table brands with the name: "new brand" the database creates automatically a new auto increment number for example: 11 but the dataset is not updated when i view the dataset the value of: drBrand["brand_id"] = 0 it says. Can somebody help me to get the right auto increment number in the dataset so i can use that auto increment number.

thx

Sander



GeneralRe: problem auto increment field Pin
Skynyrd22-Dec-04 13:35
Skynyrd22-Dec-04 13:35 
GeneralRe: problem auto increment field Pin
Heath Stewart22-Dec-04 19:07
protectorHeath Stewart22-Dec-04 19:07 
GeneralRe: problem auto increment field Pin
Gedrain23-Dec-04 3:13
Gedrain23-Dec-04 3:13 
GeneralRe: problem auto increment field Pin
Heath Stewart23-Dec-04 4:59
protectorHeath Stewart23-Dec-04 4:59 
GeneralTextBox Pin
Aviv Halperin22-Dec-04 11:56
Aviv Halperin22-Dec-04 11:56 
GeneralRe: TextBox Pin
Heath Stewart22-Dec-04 12:11
protectorHeath Stewart22-Dec-04 12:11 
GeneralRe: TextBox Pin
Aviv Halperin22-Dec-04 12:17
Aviv Halperin22-Dec-04 12:17 
GeneralRe: TextBox Pin
Heath Stewart22-Dec-04 12:40
protectorHeath Stewart22-Dec-04 12:40 
GeneralRe: TextBox Pin
Aviv Halperin22-Dec-04 12:20
Aviv Halperin22-Dec-04 12:20 
GeneralRe: TextBox Pin
Skynyrd22-Dec-04 12:29
Skynyrd22-Dec-04 12:29 
GeneralRe: TextBox Pin
Aviv Halperin22-Dec-04 12:39
Aviv Halperin22-Dec-04 12:39 
GeneralRe: TextBox Pin
Skynyrd22-Dec-04 12:46
Skynyrd22-Dec-04 12:46 
GeneralRe: TextBox Pin
Heath Stewart22-Dec-04 12:50
protectorHeath Stewart22-Dec-04 12:50 
GeneralRe: TextBox Pin
Aviv Halperin22-Dec-04 13:13
Aviv Halperin22-Dec-04 13:13 
GeneralRe: TextBox Pin
Heath Stewart22-Dec-04 13:18
protectorHeath Stewart22-Dec-04 13:18 
GeneralRe: TextBox Pin
Aviv Halperin22-Dec-04 13:20
Aviv Halperin22-Dec-04 13:20 
GeneralRe: TextBox Pin
Matt Gerrans22-Dec-04 12:31
Matt Gerrans22-Dec-04 12:31 

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.