Click here to Skip to main content
15,913,722 members
Home / Discussions / Database
   

Database

 
GeneralSQL Server Extended Stored Procedures Pin
Anil Kumar Saharan1-Sep-04 11:53
Anil Kumar Saharan1-Sep-04 11:53 
GeneralMulti threaded ADO Pin
snodgrass1-Sep-04 4:28
snodgrass1-Sep-04 4:28 
Questiontrigger problem? Pin
sumank31-Aug-04 19:59
sumank31-Aug-04 19:59 
GeneralADO.net - Data source doesn't recognise my dataset Pin
savagerx31-Aug-04 6:53
savagerx31-Aug-04 6:53 
GeneralRe: ADO.net - Data source doesn't recognise my dataset Pin
Rocky Moore31-Aug-04 20:05
Rocky Moore31-Aug-04 20:05 
GeneralStored Proc not returning my Output Pin
matthias s.31-Aug-04 3:51
matthias s.31-Aug-04 3:51 
GeneralRe: Stored Proc not returning my Output Pin
Michael P Butler31-Aug-04 4:45
Michael P Butler31-Aug-04 4:45 
GeneralRe: Stored Proc not returning my Output Pin
matthias s.31-Aug-04 4:55
matthias s.31-Aug-04 4:55 
Hi Michael,

thanks for your response. Yes, I've thought about this as well. But even putting it outside the IF doesn't yield correct results. I'm posting an extract of the code which is actually executing the SP here. Maybe I'm just blind...
<br />
            int nResult = 0;<br />
            DateTime dtResult = new DateTime(0);<br />
            SqlCommand cmd = new SqlCommand(ProcName, Open());<br />
<br />
            try {<br />
                cmd.CommandType = System.Data.CommandType.StoredProcedure;<br />
<br />
				-- do stuff and and all params...<br />
                cmd.Parameters.Add(new SqlParameter("ElementID", ElementID));<br />
                cmd.Parameters.Add(new SqlParameter("DateModified", DateModified));<br />
<br />
                //  add the DateTime output param<br />
                SqlParameter prmNewDtModif = new SqlParameter("NewDateModified", dtResult);<br />
                prmNewDtModif.Direction = System.Data.ParameterDirection.Output;<br />
                cmd.Parameters.Add(prmNewDtModif);<br />
<br />
                nResult = (Int32) cmd.ExecuteScalar();<br />
				<br />
            }<br />
			<br />
			//	catch stuff omitted...<br />


I've just put the stuff in which seems to be relevant. Variable names are selfexplanatory I guess.

Any ideas?

Matthias




If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)

www.emvoid.de

GeneralRe: Stored Proc not returning my Output Pin
Michael P Butler31-Aug-04 5:07
Michael P Butler31-Aug-04 5:07 
GeneralRe: Stored Proc not returning my Output Pin
bnieland31-Aug-04 5:00
bnieland31-Aug-04 5:00 
GeneralSolution found! Pin
matthias s.31-Aug-04 5:19
matthias s.31-Aug-04 5:19 
GeneralTrace automation Pin
Deb22230-Aug-04 11:43
Deb22230-Aug-04 11:43 
GeneralDeriving from DataTable and adding rows in a different thread while displaying the table in a DataGrid. Pin
Michael Hulthin30-Aug-04 5:37
Michael Hulthin30-Aug-04 5:37 
GeneralSQL question Pin
NewPureLand28-Aug-04 18:00
NewPureLand28-Aug-04 18:00 
GeneralRe: SQL question Pin
NewPureLand28-Aug-04 19:38
NewPureLand28-Aug-04 19:38 
GeneralRe: SQL question Pin
Colin Angus Mackay28-Aug-04 22:55
Colin Angus Mackay28-Aug-04 22:55 
GeneralRe: SQL question Pin
mike.hall@lehigh.edu30-Aug-04 2:46
mike.hall@lehigh.edu30-Aug-04 2:46 
Generalfunctions Pin
jairajanbrothers27-Aug-04 23:42
jairajanbrothers27-Aug-04 23:42 
GeneralRe: functions Pin
Mazdak27-Aug-04 23:51
Mazdak27-Aug-04 23:51 
GeneralRe: functions Pin
Colin Angus Mackay28-Aug-04 2:04
Colin Angus Mackay28-Aug-04 2:04 
GeneralRe: functions Pin
Mazdak28-Aug-04 3:10
Mazdak28-Aug-04 3:10 
GeneralRe: functions Pin
Colin Angus Mackay28-Aug-04 4:31
Colin Angus Mackay28-Aug-04 4:31 
GeneralRe: functions Pin
Mazdak28-Aug-04 4:40
Mazdak28-Aug-04 4:40 
GeneralRe: functions Pin
Colin Angus Mackay28-Aug-04 2:04
Colin Angus Mackay28-Aug-04 2:04 
GeneralRe: functions Pin
Rocky Moore31-Aug-04 19:55
Rocky Moore31-Aug-04 19:55 

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.