Click here to Skip to main content
15,918,706 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataGrid - XML Pin
blue_arc7-Feb-07 0:45
blue_arc7-Feb-07 0:45 
GeneralRe: DataGrid - XML Pin
The Brazilian One7-Feb-07 0:53
The Brazilian One7-Feb-07 0:53 
GeneralRe: DataGrid - XML Pin
Ryno Burger7-Feb-07 1:01
Ryno Burger7-Feb-07 1:01 
GeneralRe: DataGrid - XML Pin
The Brazilian One7-Feb-07 1:03
The Brazilian One7-Feb-07 1:03 
QuestionFill a DataSet from a data source and update another data source Pin
Kamran Zafar7-Feb-07 0:31
Kamran Zafar7-Feb-07 0:31 
Questionget value from database into a variable Pin
Nekshan7-Feb-07 0:22
Nekshan7-Feb-07 0:22 
AnswerRe: get value from database into a variable Pin
blue_arc7-Feb-07 0:43
blue_arc7-Feb-07 0:43 
AnswerRe: get value from database into a variable Pin
Corinna John7-Feb-07 0:48
Corinna John7-Feb-07 0:48 
Your statement getsthe query string into the string variable str. The compiler error occurs, because str is declared as an int.

If you want to use LINQ to query the datasource, try this article:
http://www.codeproject.com/useritems/SudokuSolver.asp[^]

Otherwise you have to connect to the database and query it with an SqlCommand:
<br />
using (SqlCommand selectCommand = new SqlCommand("select dashboardid from dashboardlogin where userid=101", connection))<br />
{<br />
object objResult = selectCommand.ExecuteScalar();<br />
if (objResult != null)<br />
{<br />
	int str = (int)objResult;<br />
}<br />
}<br />



____________________________________
There is no proof for this sentence.

AnswerRe: get value from database into a variable Pin
aSarafian7-Feb-07 0:52
aSarafian7-Feb-07 0:52 
QuestionInterface Implementation Pin
naveen srirangam7-Feb-07 0:03
naveen srirangam7-Feb-07 0:03 
AnswerRe: Interface Implementation Pin
gauthee7-Feb-07 0:12
gauthee7-Feb-07 0:12 
GeneralRe: Interface Implementation Pin
Luc Pattyn7-Feb-07 7:59
sitebuilderLuc Pattyn7-Feb-07 7:59 
Questionget a value from database into a variable Pin
Nekshan7-Feb-07 0:02
Nekshan7-Feb-07 0:02 
AnswerRe: get a value from database into a variable Pin
gauthee7-Feb-07 0:10
gauthee7-Feb-07 0:10 
GeneralRe: get a value from database into a variable Pin
Nekshan7-Feb-07 0:20
Nekshan7-Feb-07 0:20 
GeneralRe: get a value from database into a variable Pin
gauthee7-Feb-07 0:38
gauthee7-Feb-07 0:38 
QuestionCompactframe work(2.0) can support treeview.backcolour? Pin
Sri harini6-Feb-07 23:50
Sri harini6-Feb-07 23:50 
Questionusing TreeView as a menu Pin
Rocky#6-Feb-07 23:42
Rocky#6-Feb-07 23:42 
AnswerRe: using TreeView as a menu Pin
VirtualVoid.NET7-Feb-07 1:35
VirtualVoid.NET7-Feb-07 1:35 
AnswerRe: using TreeView as a menu Pin
Rizawn7-Feb-07 5:38
Rizawn7-Feb-07 5:38 
GeneralRe: using TreeView as a menu Pin
Rocky#7-Feb-07 19:06
Rocky#7-Feb-07 19:06 
Questionremote Pin
mihksoft6-Feb-07 23:01
mihksoft6-Feb-07 23:01 
QuestionCollection Editor Pin
bobsugar2226-Feb-07 22:32
bobsugar2226-Feb-07 22:32 
AnswerRe: Collection Editor Pin
JoeSharp6-Feb-07 23:15
JoeSharp6-Feb-07 23:15 
QuestionCan't access related tables when using the dataset designer. Pin
akkram6-Feb-07 22:32
akkram6-Feb-07 22:32 

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.