Click here to Skip to main content
15,897,273 members
Home / Discussions / Database
   

Database

 
QuestionWhy won't this update to my Database? Pin
fortyonejb21-Oct-04 4:52
fortyonejb21-Oct-04 4:52 
Generalupdating a database in C# Pin
steve_rm21-Oct-04 4:10
steve_rm21-Oct-04 4:10 
GeneralVB, ADO, XP - Which one is falling over?! Pin
Pete Belcher20-Oct-04 23:04
Pete Belcher20-Oct-04 23:04 
GeneralRe: VB, ADO, XP - Which one is falling over?! Pin
Michael Potter21-Oct-04 5:05
Michael Potter21-Oct-04 5:05 
GeneralSimple Question on Oracle dbms_utility.get_time Pin
devvvy20-Oct-04 20:34
devvvy20-Oct-04 20:34 
GeneralRe: Simple Question on Oracle dbms_utility.get_time Pin
DiWa20-Oct-04 22:44
DiWa20-Oct-04 22:44 
QuestionDatasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com20-Oct-04 12:03
david@mindplay.com20-Oct-04 12:03 
AnswerRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay20-Oct-04 22:00
Colin Angus Mackay20-Oct-04 22:00 
Use stored procedures (if you can, not all DBMS support them).
CREATE PROCEDURE dbo.MyProc
@SomeKey int
AS
SELECT * FROM TableA WHERE Id = @SomeKey
SELECT * FROM TableB WHERE Id = @SomeKey
SELECT * FROM TableC WHERE Id = @SomeKey
GO
Then on the .NET side use
SqlConnection conn = new SqlConnection(theConnectionString);
SqlCommand cmd = new SqlCommand("MyProc", conn);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapeter da = new SqlDataAdapter(cmd);
da.Fill(theDataSet);
// theDataSet will now have three tables



You might find this code generation tool useful: http://www.dotnetnuke.dk/Default.aspx?tabid=64[^] It is quite simple, but there is an offline version you can download, if you are willing to pay for it. Even if you don't use the code it generates, it gives a great example of how to build your data abstraction layer clearly and efficiently while dealing with multiple database systems. IMO.

Does this help?


Do you want to know more?


Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 8:16
david@mindplay.com21-Oct-04 8:16 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 11:44
Colin Angus Mackay21-Oct-04 11:44 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:11
david@mindplay.com21-Oct-04 12:11 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 12:23
Colin Angus Mackay21-Oct-04 12:23 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:38
david@mindplay.com21-Oct-04 12:38 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 12:45
Colin Angus Mackay21-Oct-04 12:45 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:55
david@mindplay.com21-Oct-04 12:55 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 11:52
Colin Angus Mackay21-Oct-04 11:52 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:22
david@mindplay.com21-Oct-04 12:22 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 12:28
Colin Angus Mackay21-Oct-04 12:28 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:43
david@mindplay.com21-Oct-04 12:43 
GeneralCheck hardware status Pin
unambiguos20-Oct-04 6:41
unambiguos20-Oct-04 6:41 
Generalproblem with execute storedproc Pin
Anonymous19-Oct-04 23:41
Anonymous19-Oct-04 23:41 
Generalolapcubebrowser Pin
Yulianto.19-Oct-04 19:36
Yulianto.19-Oct-04 19:36 
Generalrestricted data type attribute violation Pin
Tom Wright19-Oct-04 12:09
Tom Wright19-Oct-04 12:09 
GeneralStored Procedure Pin
cooldev19-Oct-04 11:55
cooldev19-Oct-04 11:55 
GeneralRe: Stored Procedure Pin
Colin Angus Mackay20-Oct-04 5:30
Colin Angus Mackay20-Oct-04 5:30 

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.