| | |
Sql Query
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2004
Posts: 11
Reputation:
Solved Threads: 0
Hi All
I have a select statement:
Select PERMISSION_BUTTON_ID from ALC_SECURITY_PERMISSION where ROLE_ID = 1
Now I want to store / retrieve the values of the field that I am querying without using dataset. Is this possible? If yes how can I do this?
Is it possible that I declare a variable Array and store the output.
I have a select statement:
Select PERMISSION_BUTTON_ID from ALC_SECURITY_PERMISSION where ROLE_ID = 1
Now I want to store / retrieve the values of the field that I am querying without using dataset. Is this possible? If yes how can I do this?
Is it possible that I declare a variable Array and store the output.
Well, if it's only one value that your going to be returned, you can use the .ExecuteScalar, which returns an Object (the first row, first column of your query).
-Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
•
•
Join Date: Jun 2008
Posts: 23
Reputation:
Solved Threads: 0
You can retrieve data from database without using dataset .
cnn.Open()
cmd = New SqlCommand(sql, cnn)
Dim count As Int32 = Convert.ToInt32(cmd.ExecuteScalar())
cmd.Dispose()
cnn.Close()
http://vb.net-informations.com/ado.n...sqlcommand.htm
bruce
cnn.Open()
cmd = New SqlCommand(sql, cnn)
Dim count As Int32 = Convert.ToInt32(cmd.ExecuteScalar())
cmd.Dispose()
cnn.Close()
http://vb.net-informations.com/ado.n...sqlcommand.htm
bruce
![]() |
Similar Threads
- sql query problem with MS Access and C# (C#)
- Urgent Help with SQL Query (MySQL)
- C# VS 2005 - SQL Query Parameters to an ODBC DataSource (C#)
- sql query updating problem (Visual Basic 4 / 5 / 6)
- Javascript array from sql query (JSP)
- Please help me out with MySQL query (MySQL)
- PHP/SQL query help (PHP)
- Retreiving variables from a sql query into a form (PHP)
Other Threads in the VB.NET Forum
- Previous Thread: OOLEDB Connection(vb.net & Access)
- Next Thread: linking two combo boxes
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add application array assignment basic binary box button buttons center click code combo connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists firewall folder function image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net opacity page pan peertopeervideostreaming picturebox plugin port print printing printpreview record regex reports" reuse right-to-left save savedialog search serial socket sorting sql sqldatbase storedprocedure string structures studio temp textbox timer txttoxmlconverter upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet vista visual visualbasic visualbasic.net web wpf xml





