Click here to Skip to main content
15,924,402 members
Home / Discussions / Database
   

Database

 
GeneralDELETE table, ignore key constraints Pin
Christian Graus24-Aug-04 12:54
protectorChristian Graus24-Aug-04 12:54 
Questionhow do I write to an access DB using ADO & VisualC++ ? Pin
Eduardo M. Rey24-Aug-04 8:48
Eduardo M. Rey24-Aug-04 8:48 
AnswerRe: how do I write to an access DB using ADO & VisualC++ ? Pin
S Sansanwal24-Aug-04 11:23
S Sansanwal24-Aug-04 11:23 
GeneralUsing ADO with Visual C++ Pin
Eduardo M. Rey24-Aug-04 8:41
Eduardo M. Rey24-Aug-04 8:41 
GeneralRe: Using ADO with Visual C++ Pin
S Sansanwal24-Aug-04 11:27
S Sansanwal24-Aug-04 11:27 
GeneralRe: Using ADO with Visual C++ Pin
Eduardo M. Rey25-Aug-04 4:18
Eduardo M. Rey25-Aug-04 4:18 
GeneralStored Proc to add a new Record and return an AutoValue Pin
matthias s.24-Aug-04 7:49
matthias s.24-Aug-04 7:49 
GeneralRe: Stored Proc to add a new Record and return an AutoValue Pin
Colin Angus Mackay24-Aug-04 10:21
Colin Angus Mackay24-Aug-04 10:21 
Create your stored procedure specifying which parameter(s) is/are output parameters like this
CREATE PROCEDURE GetInformation
(
    @SomeKey int,
    @SomeResult int OUTPUT
)
AS
SELECT @SomeResult = AnswerField 
FROM MyTable 
WHERE ThePrimaryKey = @SomeKey
GO


Then in your .NET application when you specify the parameters for the stored procedure, make sure you specify which parameter(s) is/are output.
SqlParameter someResult = new SqlParameter("@SomeKey", SqlDbType.Int);
someResult.Direction = ParameterDirection.Output;

When you have run your query, you can then get the value of the output parameter with
int result = (int)someResult.Value;


Does this help?


"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell

Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!


GeneralRe: Stored Proc to add a new Record and return an AutoValue Pin
cmk24-Aug-04 12:08
cmk24-Aug-04 12:08 
GeneralCreate Table, Default Value Pin
si_6924-Aug-04 0:37
si_6924-Aug-04 0:37 
GeneralRe: Create Table, Default Value Pin
Anonymous24-Aug-04 2:54
Anonymous24-Aug-04 2:54 
GeneralRe: Create Table, Default Value Pin
S Sansanwal24-Aug-04 11:18
S Sansanwal24-Aug-04 11:18 
QuestionHow do I run my SQL script from .msi ?? Pin
IrishSonic23-Aug-04 22:20
IrishSonic23-Aug-04 22:20 
AnswerRe: How do I run my SQL script from .msi ?? Pin
Colin Angus Mackay23-Aug-04 22:30
Colin Angus Mackay23-Aug-04 22:30 
GeneralRe: How do I run my SQL script from .msi ?? Pin
IrishSonic24-Aug-04 0:39
IrishSonic24-Aug-04 0:39 
QuestionUpdate database from a XML dataset file ? Pin
zWyThoS23-Aug-04 11:22
zWyThoS23-Aug-04 11:22 
AnswerRe: Update database from a XML dataset file ? Pin
S Sansanwal23-Aug-04 12:17
S Sansanwal23-Aug-04 12:17 
AnswerRe: Update database from a XML dataset file ? Pin
mikasa25-Aug-04 11:27
mikasa25-Aug-04 11:27 
QuestionDISTINCT values of Datatable columns??? Pin
mittalpa23-Aug-04 10:43
mittalpa23-Aug-04 10:43 
AnswerRe: DISTINCT values of Datatable columns??? Pin
S Sansanwal23-Aug-04 12:24
S Sansanwal23-Aug-04 12:24 
GeneralRe: DISTINCT values of Datatable columns??? Pin
mittalpa24-Aug-04 3:23
mittalpa24-Aug-04 3:23 
GeneralSmallDateTime and changing to DateTime Pin
Paul Watson23-Aug-04 7:37
sitebuilderPaul Watson23-Aug-04 7:37 
GeneralRe: SmallDateTime and changing to DateTime Pin
Colin Angus Mackay23-Aug-04 9:57
Colin Angus Mackay23-Aug-04 9:57 
GeneralRe: SmallDateTime and changing to DateTime Pin
Steven Campbell23-Aug-04 10:16
Steven Campbell23-Aug-04 10:16 
QuestionHow to retrieve data from stored function? Pin
Chodici Mrkev23-Aug-04 5:57
Chodici Mrkev23-Aug-04 5:57 

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.