![]() |
| ||
| sql view in vb.net Is it possible to call a sql view in vb.net? I can call stored procs, but when I change the code to read a view it says that "request for procedure failed because it is a view object" |
| ||
| Re: sql view in vb.net A view is like a table, so wouldn't you need to SELECT data from it ? |
| ||
| Re: sql view in vb.net Hi You can view your SQl Table in vb.net with the help of DataSet and DataView. EXAMPLE: Dim cn3 As SqlCeConnection = Nothing cn3 = New SqlCeConnection("Data Source=\My Documents\Databasename.sdf; " + "Password=") Try If cn3.State = ConnectionState.Open Then cn3.Close() End If cn3.Open() Dim da3 As New SqlCeDataAdapter("SELECT * FROM TABLENAME", cn3) ' da3.Fill(ds, "TABLENAME") cn3.Close() Dim dv As New DataView dv = ds.Tables("TABLENAME").DefaultView DataGrid1.DataSource = dv Catch sce As SqlCeException MessageBox.Show(sce.Message) End Try cn3.Close() |
| ||
| Re: sql view in vb.net use this following code : this code needed 1 datagrid to show data. in Module : procedure to show data : Private Sub Show_Data() in form, in form load event or other event : Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load |
| ||
| Re: sql view in vb.net how do select two columns from table and bind the data in data grid view control in vb.net using SQl query |
| ||
| Re: sql view in vb.net use join on your sql query. |
| All times are GMT -4. The time now is 12:55 pm. |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC