![]() |
| ||
| Sql Query 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. |
| ||
| Re: Sql Query 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). |
| ||
| Re: Sql Query 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 |
| All times are GMT -4. The time now is 9:01 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC