Click here to Skip to main content
15,919,132 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reading Byte of Buffer Pin
gauthee20-Sep-07 1:08
gauthee20-Sep-07 1:08 
QuestionRelated to Clicking a DataGridViewComboBoxColumn thrice to select an Item of DataGridView Pin
Rudra Rath20-Sep-07 0:21
Rudra Rath20-Sep-07 0:21 
Questionfile transfer problem !!! Pin
samforu20-Sep-07 0:18
samforu20-Sep-07 0:18 
QuestionProblem with WSE 3.0 and project in c# Pin
dift20-Sep-07 0:01
dift20-Sep-07 0:01 
Questionautonumber Pin
KppsK19-Sep-07 23:58
KppsK19-Sep-07 23:58 
AnswerRe: autonumber Pin
Colin Angus Mackay20-Sep-07 0:12
Colin Angus Mackay20-Sep-07 0:12 
AnswerRe: autonumber Pin
Kuldeep Antil20-Sep-07 0:17
Kuldeep Antil20-Sep-07 0:17 
AnswerRe: autonumber Pin
Pete O'Hanlon20-Sep-07 0:20
mvePete O'Hanlon20-Sep-07 0:20 
Well - first of all, the database must support an autoincrement. Then, you need to get this value back. If it's SQL Server, then you are in luck because you can use the Scope_Identity in the same command to retrieve the value just inserted. Ideally, you would do this in a stored procedure. For instance:
CREATE PROCEDURE [dbo].[SaveData]
@ID INT OUT,
@Name NVARCHAR(50)
AS
SET NOCOUNT ON

INSERT INTO MyTable (Name) VALUES (@Name)

SET @ID = Scope_Identity()
To retrieve the information, you would use a SQL Command and add the @ID and @Name parameters yourself. The OutputDirection of @ID would be InputOutput, which allows you to retrieve the incremented value from @ID.

Deja View - the feeling that you've seen this post before.

Questionbyte array conversion Pin
bttds19-Sep-07 23:38
bttds19-Sep-07 23:38 
AnswerRe: byte array conversion Pin
Guffa20-Sep-07 2:38
Guffa20-Sep-07 2:38 
GeneralRe: byte array conversion Pin
bttds20-Sep-07 15:47
bttds20-Sep-07 15:47 
AnswerRe: byte array conversion Pin
Guffa21-Sep-07 10:03
Guffa21-Sep-07 10:03 
QuestionHash Table Problem Urgent Pin
Nishad8519-Sep-07 23:21
Nishad8519-Sep-07 23:21 
AnswerRe: Hash Table Problem Urgent Pin
Pete O'Hanlon19-Sep-07 23:41
mvePete O'Hanlon19-Sep-07 23:41 
AnswerRe: Hash Table Problem Urgent Pin
lost in transition 20-Sep-07 11:27
lost in transition 20-Sep-07 11:27 
Questionurgent copy image from hard Drive on local host Pin
mavii19-Sep-07 22:56
mavii19-Sep-07 22:56 
AnswerRe: urgent copy image from hard Drive on local host Pin
Giorgi Dalakishvili19-Sep-07 23:21
mentorGiorgi Dalakishvili19-Sep-07 23:21 
GeneralRe: urgent copy image from hard Drive on local host Pin
mavii19-Sep-07 23:51
mavii19-Sep-07 23:51 
GeneralRe: urgent copy image from hard Drive on local host Pin
Pete O'Hanlon19-Sep-07 23:55
mvePete O'Hanlon19-Sep-07 23:55 
GeneralRe: urgent copy image from hard Drive on local host Pin
mavii20-Sep-07 0:35
mavii20-Sep-07 0:35 
GeneralRe: urgent copy image from hard Drive on local host Pin
pmarfleet20-Sep-07 1:13
pmarfleet20-Sep-07 1:13 
GeneralRe: urgent copy image from hard Drive on local host Pin
Pete O'Hanlon20-Sep-07 1:20
mvePete O'Hanlon20-Sep-07 1:20 
GeneralRe: urgent copy image from hard Drive on local host Pin
mavii21-Sep-07 1:01
mavii21-Sep-07 1:01 
AnswerRe: urgent copy image from hard Drive on local host Pin
Malcolm Smart20-Sep-07 1:38
Malcolm Smart20-Sep-07 1:38 
Questionc++ equivalent of c# code Pin
tasumisra19-Sep-07 22:40
tasumisra19-Sep-07 22:40 

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.