Click here to Skip to main content
16,011,870 members
Home / Discussions / Database
   

Database

 
QuestionA SQL procedure to STOP repeated info being stored Pin
tedhill134-Feb-07 5:58
tedhill134-Feb-07 5:58 
AnswerRe: A SQL procedure to STOP repeated info being stored Pin
Colin Angus Mackay4-Feb-07 11:40
Colin Angus Mackay4-Feb-07 11:40 
GeneralRe: A SQL procedure to STOP repeated info being stored Pin
tedhill134-Feb-07 23:23
tedhill134-Feb-07 23:23 
GeneralRe: A SQL procedure to STOP repeated info being stored Pin
Colin Angus Mackay5-Feb-07 1:30
Colin Angus Mackay5-Feb-07 1:30 
AnswerRe: A SQL procedure to STOP repeated info being stored Pin
PIEBALDconsult4-Feb-07 16:34
mvePIEBALDconsult4-Feb-07 16:34 
QuestionSample application Pin
CoolOT3-Feb-07 7:25
CoolOT3-Feb-07 7:25 
AnswerRe: Sample application Pin
User 17164923-Feb-07 8:10
professionalUser 17164923-Feb-07 8:10 
QuestionReading Return Val from SP Called from VB.NET? Pin
Justin Cooke2-Feb-07 7:05
Justin Cooke2-Feb-07 7:05 
Hi All,

I'm calling a SQL2000 SP from my VB.NET app with the following code:

<br />
Dim sqlCmd As SqlCommand<br />
sqlCmd = New SqlCommand("JHU_SAS_IDOC_Process", conn)<br />
sqlCmd.CommandType = CommandType.StoredProcedure<br />
<br />
Dim adapter As SqlDataAdapter = New SqlDataAdapter(sqlCmd)<br />
<br />
adapter.Fill(tableReturned)<br />


This SP performs a SELECT that causes the tableReturned (a DataTable) to be filled. The SP also returns an INT (0 or 1, depending on whether an error occurred). The SP code is basically this (much simplified for this question):
<br />
CREATE PROCEDURE dbo.JHU_SAS_IDOC_Process<br />
	<br />
AS<br />
<br />
BEGIN<br />
<br />
	SELECT * FROM JHU_SAS_IDOC<br />
	<br />
	RETURN 1 -- or 0, depending on an error condition<br />
		<br />
END<br />


My question is: How do I read that return value in the app? I think I could read it using the SqlCommand.ExecuteScalar() func, but that wouldn't work to fill my table. Any ideas?

Thanks!
Justin
AnswerRe: Reading Return Val from SP Called from VB.NET? Pin
Colin Angus Mackay2-Feb-07 8:47
Colin Angus Mackay2-Feb-07 8:47 
QuestionSql Server query syntax needed Pin
Saira Tanwir2-Feb-07 6:56
Saira Tanwir2-Feb-07 6:56 
AnswerRe: Sql Server query syntax needed Pin
Colin Angus Mackay2-Feb-07 8:38
Colin Angus Mackay2-Feb-07 8:38 
AnswerRe: Sql Server query syntax needed Pin
PIEBALDconsult2-Feb-07 8:43
mvePIEBALDconsult2-Feb-07 8:43 
QuestionSQL Query Pin
Tyrone_whitey2-Feb-07 5:00
Tyrone_whitey2-Feb-07 5:00 
AnswerRe: SQL Query Pin
andyharman2-Feb-07 5:56
professionalandyharman2-Feb-07 5:56 
QuestionProblems with a delete TSQL statement Pin
matthias s.2-Feb-07 3:18
matthias s.2-Feb-07 3:18 
AnswerRe: Problems with a delete TSQL statement Pin
Colin Angus Mackay2-Feb-07 3:38
Colin Angus Mackay2-Feb-07 3:38 
GeneralRe: Problems with a delete TSQL statement Pin
matthias s.2-Feb-07 3:56
matthias s.2-Feb-07 3:56 
AnswerRe: Problems with a delete TSQL statement Pin
Frank Kerrigan2-Feb-07 5:50
Frank Kerrigan2-Feb-07 5:50 
QuestionReferences in SQL Server Project Pin
Brady Kelly2-Feb-07 2:18
Brady Kelly2-Feb-07 2:18 
Questionregarding debug Pin
aslamshaik25109782-Feb-07 1:27
aslamshaik25109782-Feb-07 1:27 
QuestionDoes Oracle how much Rule follow codd’s rules? Pin
PavanPareta2-Feb-07 1:17
PavanPareta2-Feb-07 1:17 
QuestionAccessing SQL Servers in the DMZ Pin
Stone Free2-Feb-07 1:07
Stone Free2-Feb-07 1:07 
QuestionAdd or edit records Pin
CoolOT2-Feb-07 0:59
CoolOT2-Feb-07 0:59 
AnswerRe: Add or edit records Pin
Pete O'Hanlon2-Feb-07 5:00
mvePete O'Hanlon2-Feb-07 5:00 
QuestionHow to perform rollback feature for SQLyog? Pin
cheeken2u1-Feb-07 23:15
cheeken2u1-Feb-07 23:15 

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.