Click here to Skip to main content
15,890,897 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Method definitions in header files Pin
Xpnctoc29-Aug-07 8:29
Xpnctoc29-Aug-07 8:29 
GeneralRe: Method definitions in header files [modified] Pin
George L. Jackson29-Aug-07 12:01
George L. Jackson29-Aug-07 12:01 
GeneralRe: Method definitions in header files Pin
Mark Salsbery29-Aug-07 12:33
Mark Salsbery29-Aug-07 12:33 
GeneralRe: Method definitions in header files [modified] Pin
George L. Jackson29-Aug-07 12:54
George L. Jackson29-Aug-07 12:54 
GeneralRe: Method definitions in header files Pin
Mark Salsbery29-Aug-07 13:08
Mark Salsbery29-Aug-07 13:08 
Questionc++ Pin
ellllllllie28-Aug-07 5:03
ellllllllie28-Aug-07 5:03 
AnswerRe: c++ Pin
Luc Pattyn28-Aug-07 5:31
sitebuilderLuc Pattyn28-Aug-07 5:31 
Questionhow to get the primary key for a new row Pin
Stefan Baens27-Aug-07 22:50
Stefan Baens27-Aug-07 22:50 
I have problem retrieving the primary key for a new row that is added to the database.
This is what I have now:
// 9. Nieuwe rij maken in tabel
DataTable^ MyTable = myDataSet->Tables[0];
DataRow^ row = MyTable->Rows->Add();
if (row != nullptr)

{
    // 10. Datavelden invullen
    row["item_id"] = item_id;
    row["use"] = use;
    row["type"] = Convert::ToInt16(type);

    // 11. Data updaten + Primary Key opvragen
    DataAdapter->Update(myDataSet, "tblPanel");
    PanelID = Convert::ToInt64(row["ID"]);
}

now the value PanelID is always 0 for the first time this loop runs, the second time and further the information is correct and I can use the PanelID to create the relation with other tables.
What am I missing?

Stefan

AnswerRe: how to get the primary key for a new row Pin
George L. Jackson28-Aug-07 0:00
George L. Jackson28-Aug-07 0:00 
GeneralRe: how to get the primary key for a new row Pin
Stefan Baens28-Aug-07 1:04
Stefan Baens28-Aug-07 1:04 
GeneralRe: how to get the primary key for a new row Pin
George L. Jackson28-Aug-07 4:14
George L. Jackson28-Aug-07 4:14 
GeneralRe: how to get the primary key for a new row Pin
George L. Jackson28-Aug-07 13:36
George L. Jackson28-Aug-07 13:36 
AnswerRe: how to get the primary key for a new row Pin
led mike28-Aug-07 4:38
led mike28-Aug-07 4:38 
GeneralRe: how to get the primary key for a new row Pin
Stefan Baens29-Aug-07 5:15
Stefan Baens29-Aug-07 5:15 
GeneralRe: how to get the primary key for a new row Pin
led mike29-Aug-07 6:06
led mike29-Aug-07 6:06 
QuestionVisualStudio2003 and .netmodule Pin
sGrabert27-Aug-07 22:11
sGrabert27-Aug-07 22:11 
AnswerRe: VisualStudio2003 and .netmodule Pin
sps-itsec4627-Aug-07 22:44
sps-itsec4627-Aug-07 22:44 
GeneralRe: VisualStudio2003 and .netmodule [modified] Pin
sGrabert28-Aug-07 0:07
sGrabert28-Aug-07 0:07 
QuestionConvert vector to managed array Pin
hansipet27-Aug-07 4:36
hansipet27-Aug-07 4:36 
AnswerRe: Convert vector to managed array Pin
led mike27-Aug-07 5:08
led mike27-Aug-07 5:08 
GeneralRe: Convert vector to managed array Pin
hansipet27-Aug-07 9:01
hansipet27-Aug-07 9:01 
GeneralRe: Convert vector to managed array Pin
George L. Jackson27-Aug-07 10:38
George L. Jackson27-Aug-07 10:38 
QuestionDefault funcations in a class Pin
Nandu_77b27-Aug-07 0:15
Nandu_77b27-Aug-07 0:15 
AnswerRe: Default funcations in a class Pin
George L. Jackson27-Aug-07 10:30
George L. Jackson27-Aug-07 10:30 
Questionhow to use and declare a Vector Pin
aefmaaradji26-Aug-07 13:43
aefmaaradji26-Aug-07 13:43 

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.