Click here to Skip to main content
15,900,724 members
Home / Discussions / Database
   

Database

 
AnswerRe: Updating a datasource through a DataGrid Pin
leckey12-Jul-06 7:25
leckey12-Jul-06 7:25 
GeneralRe: Updating a datasource through a DataGrid Pin
hamidreza_buddy12-Jul-06 7:37
hamidreza_buddy12-Jul-06 7:37 
GeneralRe: Updating a datasource through a DataGrid Pin
leckey12-Jul-06 7:47
leckey12-Jul-06 7:47 
GeneralRe: Updating a datasource through a DataGrid Pin
hamidreza_buddy12-Jul-06 8:00
hamidreza_buddy12-Jul-06 8:00 
GeneralRe: Updating a datasource through a DataGrid Pin
leckey12-Jul-06 8:15
leckey12-Jul-06 8:15 
QuestionSetting up output parameters in stored proc: Part 2 Pin
leckey12-Jul-06 5:21
leckey12-Jul-06 5:21 
AnswerRe: Setting up output parameters in stored proc: Part 2 Pin
Mike Dimmick12-Jul-06 6:53
Mike Dimmick12-Jul-06 6:53 
GeneralRe: Setting up output parameters in stored proc: Part 2 [modified] Pin
leckey12-Jul-06 7:02
leckey12-Jul-06 7:02 
Actually I need to pass all three. Thanks for catching that. Param 1 is the part number, param 5 is the part type, and param 6 the ID for output. So now I have:
ds2=SqlHelper.ExecuteDataset(this.connectionString, CommandType.StoredProcedure,"dbo.UpdatePart_Step_1_Test3", param1, param5, param6);

I revamped some earlier code. Basically the part type is a drop down box with a description, but now I send the actual partTypeID. So now my stored proc looks like:
CREATE PROCEDURE [dbo].[UpdatePart_Step_1_Test3]<br />
@PartNumber varchar (15),<br />
@PartTypeValue varchar (60),<br />
@ID int OUTPUT<br />
<br />
AS<br />
<br />
if NOT EXISTS (Select * from Parts where PartNumber = @PartNumber)<br />
BEGIN<br />
<br />
insert into Parts<br />
(PartNumber, PartTypeID)<br />
<br />
VALUES<br />
(<br />
@PartNumber,<br />
@PartTypeValue<br />
)<br />
<br />
END<br />
SELECT @ID = @@IDENTITY<br />
<br />
<br />
return 0<br />
GO





-- modified at 15:43 Wednesday 12th July, 2006
QuestionThrowing an exception based on sp's returned value Pin
Brendan Vogt12-Jul-06 3:18
Brendan Vogt12-Jul-06 3:18 
AnswerRe: Throwing an exception based on sp's returned value Pin
kumarprabhakar7412-Jul-06 18:33
kumarprabhakar7412-Jul-06 18:33 
QuestionRe: Throwing an exception based on sp's returned value Pin
Brendan Vogt12-Jul-06 21:34
Brendan Vogt12-Jul-06 21:34 
QuestionHow to create Database file programmatically? Pin
MityaB12-Jul-06 1:42
MityaB12-Jul-06 1:42 
AnswerRe: How to create Database file programmatically? Pin
Reza Raad12-Jul-06 2:16
Reza Raad12-Jul-06 2:16 
GeneralRe: How to create Database file programmatically? Pin
MityaB12-Jul-06 2:40
MityaB12-Jul-06 2:40 
AnswerRe: How to create Database file programmatically? Pin
Eric Dahlvang12-Jul-06 3:12
Eric Dahlvang12-Jul-06 3:12 
QuestionIterating trough database tables (SQL) Pin
johan313112-Jul-06 0:59
johan313112-Jul-06 0:59 
AnswerRe: Iterating trough database tables (SQL) Pin
kumarprabhakar7412-Jul-06 2:00
kumarprabhakar7412-Jul-06 2:00 
AnswerRe: Iterating trough database tables (SQL) Pin
Steve S12-Jul-06 3:03
Steve S12-Jul-06 3:03 
AnswerRe: Iterating trough database tables (SQL) Pin
Scott Serl12-Jul-06 6:29
Scott Serl12-Jul-06 6:29 
GeneralRe: Iterating trough database tables (SQL) Pin
johan313113-Jul-06 0:35
johan313113-Jul-06 0:35 
QuestionINSERT INTO and SELECT statement... pls help urgently.. Pin
For_IT12-Jul-06 0:19
For_IT12-Jul-06 0:19 
AnswerRe: INSERT INTO and SELECT statement... pls help urgently.. Pin
VK-Cadec12-Jul-06 9:53
VK-Cadec12-Jul-06 9:53 
QuestionData Access Application Block Pin
Brendan Vogt11-Jul-06 21:22
Brendan Vogt11-Jul-06 21:22 
AnswerRe: Data Access Application Block Pin
kumarprabhakar7412-Jul-06 0:25
kumarprabhakar7412-Jul-06 0:25 
QuestionThe using block Pin
Brendan Vogt11-Jul-06 21:12
Brendan Vogt11-Jul-06 21:12 

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.