Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to retrieve a single value from datatable Pin
Richard MacCutchan21-Jan-12 23:01
mveRichard MacCutchan21-Jan-12 23:01 
GeneralRe: how to retrieve a single value from datatable Pin
mschotamaster22-Jan-12 3:12
mschotamaster22-Jan-12 3:12 
GeneralRe: how to retrieve a single value from datatable Pin
Richard MacCutchan22-Jan-12 3:15
mveRichard MacCutchan22-Jan-12 3:15 
GeneralRe: how to retrieve a single value from datatable Pin
mschotamaster22-Jan-12 3:17
mschotamaster22-Jan-12 3:17 
GeneralRe: how to retrieve a single value from datatable Pin
Richard MacCutchan22-Jan-12 3:23
mveRichard MacCutchan22-Jan-12 3:23 
GeneralRe: how to retrieve a single value from datatable Pin
mschotamaster22-Jan-12 3:38
mschotamaster22-Jan-12 3:38 
GeneralRe: how to retrieve a single value from datatable Pin
Nathan Stiles23-Jan-12 10:45
Nathan Stiles23-Jan-12 10:45 
AnswerRe: how to retrieve a single value from datatable Pin
Eddy Vluggen22-Jan-12 3:41
professionalEddy Vluggen22-Jan-12 3:41 
mschotamaster wrote:
sql2008

I have a table

Aight, first you'd need a Sql-statement to select the value you're interested in. Something like this
SQL
SELECT [connType]
  FROM [Login]
 WHERE [Id] = @Id


mschotamaster wrote:
i want to fetch connType value of the logged user to do like this

Open a <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx">SqlConnection</a>[<a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx" target="_blank" title="New Window">^</a>] (using a correct connectionstring[^]), create a <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx">SqlCommand</a>[<a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx" target="_blank" title="New Window">^</a>], put the Sql-statement in the CommandText property, add the parameter, open the connection, and catch the result from the ExecuteScalar[^]-method.
Bastard Programmer from Hell Suspicious | :suss:

GeneralRe: how to retrieve a single value from datatable Pin
mschotamaster22-Jan-12 3:48
mschotamaster22-Jan-12 3:48 
GeneralRe: how to retrieve a single value from datatable Pin
Eddy Vluggen22-Jan-12 3:49
professionalEddy Vluggen22-Jan-12 3:49 
AnswerRe: how to retrieve a single value from datatable Pin
Luc Pattyn22-Jan-12 4:05
sitebuilderLuc Pattyn22-Jan-12 4:05 
GeneralRe: how to retrieve a single value from datatable Pin
Richard MacCutchan22-Jan-12 5:06
mveRichard MacCutchan22-Jan-12 5:06 
Questionhow made a factor i c# Pin
Alireza_Nasr21-Jan-12 7:49
Alireza_Nasr21-Jan-12 7:49 
AnswerRe: how made a factor i c# Pin
Dave Kreskowiak21-Jan-12 14:11
mveDave Kreskowiak21-Jan-12 14:11 
AnswerRe: how made a factor i c# Pin
Nathan Stiles23-Jan-12 10:46
Nathan Stiles23-Jan-12 10:46 
QuestionCreate XML file with C# Pin
RivasBoy21-Jan-12 7:26
RivasBoy21-Jan-12 7:26 
AnswerRe: Create XML file with C# Pin
Eddy Vluggen21-Jan-12 11:24
professionalEddy Vluggen21-Jan-12 11:24 
AnswerRe: Create XML file with C# Pin
Nathan Stiles23-Jan-12 10:48
Nathan Stiles23-Jan-12 10:48 
Question.NET Framework 4.0 and 2.0 Pin
MAW3020-Jan-12 11:23
MAW3020-Jan-12 11:23 
AnswerRe: .NET Framework 4.0 and 2.0 Pin
Richard Andrew x6420-Jan-12 11:54
professionalRichard Andrew x6420-Jan-12 11:54 
AnswerRe: .NET Framework 4.0 and 2.0 Pin
jschell20-Jan-12 12:42
jschell20-Jan-12 12:42 
AnswerRe: .NET Framework 4.0 and 2.0 Pin
Shameel20-Jan-12 18:57
professionalShameel20-Jan-12 18:57 
AnswerRe: .NET Framework 4.0 and 2.0 Pin
PIEBALDconsult21-Jan-12 3:12
mvePIEBALDconsult21-Jan-12 3:12 
QuestionSize Image in PictureBox Pin
Steve Harp20-Jan-12 9:40
Steve Harp20-Jan-12 9:40 
AnswerRe: Size Image in PictureBox Pin
Dave Kreskowiak20-Jan-12 10:29
mveDave Kreskowiak20-Jan-12 10:29 

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.