Click here to Skip to main content
15,910,009 members
Home / Discussions / Database
   

Database

 
GeneralRe: Partitioning Pin
Judah Gabriel Himango16-Feb-06 16:44
sponsorJudah Gabriel Himango16-Feb-06 16:44 
QuestionT- SQL Inner Select Pin
Greeky16-Feb-06 1:21
Greeky16-Feb-06 1:21 
AnswerRe: T- SQL Inner Select Pin
Colin Angus Mackay16-Feb-06 2:16
Colin Angus Mackay16-Feb-06 2:16 
QuestionUML modeling Pin
Klempie15-Feb-06 23:57
Klempie15-Feb-06 23:57 
AnswerRe: UML modeling Pin
Juan Pedro Prez16-Feb-06 2:05
Juan Pedro Prez16-Feb-06 2:05 
GeneralRe: UML modeling Pin
Paul Conrad16-Feb-06 17:14
professionalPaul Conrad16-Feb-06 17:14 
AnswerRe: UML modeling Pin
Klempie16-Feb-06 19:25
Klempie16-Feb-06 19:25 
QuestionHelp with ADO.NET, please Pin
Juan Pedro Prez15-Feb-06 23:20
Juan Pedro Prez15-Feb-06 23:20 
Hello,

I'm new to ADO.NET and I'm working on my first little application. I feel I'm missing something really important about this architecture, and I'm messing things up.

Lets say I have a database in Access with a Table A. This Table A have an autonumerical PK, so I don't have to worry about it. Up to this point, great. I managed to configure my DataAdapter with commands so I don't have to worry about the PK, for Access does this work for me.

Next, I create a Table B that have as a FK the aforementioned Table A PK. I duplicate in a DataSet this two tables, create a new row in A and then intended to create related rows in B to this new A row. And here is where all the hell broke loose.

As a single-user non-concurrent app, I decided to control the A PK directy in it. During the dataset construction, I read the highest PK from the database and create in DataSet-Table A a PK field with the autonumerical True and its seed fixed to that maximun readed from the DB. Then I generate every new DataSet Table A rows with a controlled PK, so I'm able to control its value to generate related rows in DataSet Table B. Although I suspect is a clumsy solution, by now it works.

But the question readily arrises. What if my app should be multiuser? How the hell can I "predict" new values in autonumerical PK controlled by the DB so I can relate rows to other tables off-line in my dataset and then merge my transactions with that of other users without PK conflicts?

Please, drop me a line. I'm suspecting I miss something fundamental and any indication could change all my messy mental schemes about ADO.NET.

Thanks in advance and greetings from Spain,

Juan Pedro Pérez
AnswerRe: Help with ADO.NET, please Pin
Mike Ellison16-Feb-06 8:04
Mike Ellison16-Feb-06 8:04 
GeneralRe: Help with ADO.NET, please Pin
Juan Pedro Prez17-Feb-06 6:06
Juan Pedro Prez17-Feb-06 6:06 
GeneralRe: Help with ADO.NET, please Pin
Mike Ellison17-Feb-06 6:32
Mike Ellison17-Feb-06 6:32 
GeneralRe: Help with ADO.NET, please Pin
Juan Pedro Prez17-Feb-06 7:46
Juan Pedro Prez17-Feb-06 7:46 
QuestionHow to get record count from OledbDataReader? Pin
rushing15-Feb-06 23:00
rushing15-Feb-06 23:00 
AnswerRe: How to get record count from OledbDataReader? Pin
Colin Angus Mackay16-Feb-06 2:11
Colin Angus Mackay16-Feb-06 2:11 
GeneralRe: How to get record count from OledbDataReader? Pin
rushing16-Feb-06 17:04
rushing16-Feb-06 17:04 
QuestionAdventure Works Database Pin
Brendan Vogt15-Feb-06 22:56
Brendan Vogt15-Feb-06 22:56 
AnswerRe: Adventure Works Database Pin
Colin Angus Mackay16-Feb-06 2:24
Colin Angus Mackay16-Feb-06 2:24 
QuestionGood ADO/ SQL Server 2005 Books Pin
Brendan Vogt15-Feb-06 20:57
Brendan Vogt15-Feb-06 20:57 
QuestionSQL Log viewer Pin
devvvy15-Feb-06 20:52
devvvy15-Feb-06 20:52 
QuestionSQL 2005 MSDN connections Pin
Tad McClellan15-Feb-06 17:51
professionalTad McClellan15-Feb-06 17:51 
AnswerRe: SQL 2005 MSDN connections Pin
Paul Conrad15-Feb-06 19:10
professionalPaul Conrad15-Feb-06 19:10 
QuestionNo SQL Server Management Tools Pin
Brendan Vogt14-Feb-06 23:40
Brendan Vogt14-Feb-06 23:40 
AnswerRe: No SQL Server Management Tools Pin
Colin Angus Mackay15-Feb-06 0:38
Colin Angus Mackay15-Feb-06 0:38 
QuestionRe: No SQL Server Management Tools Pin
Brendan Vogt15-Feb-06 1:02
Brendan Vogt15-Feb-06 1:02 
AnswerRe: No SQL Server Management Tools Pin
Colin Angus Mackay15-Feb-06 1:07
Colin Angus Mackay15-Feb-06 1:07 

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.