Re: Database Permission I am databinding a datagrid. I tried that and it still doesn't seem
to work. I will paste my code...
Is there something I'm missing?
Public Function BindGrid(ProcName as String, myDataGrid as
DataGrid, cmd as SqlCommand, con as SqlConnection) as Integer
Dim ds As DataSet
Dim da As new SqlDataAdapter()
Try
cmd.CommandText = ProcName
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = con
da.Selectcommand = cmd
ds = new DataSet()
da.Fill(ds, "MyTable")
myDataGrid.DataSource=ds.Tables("MyTable").Default View
myDataGrid.DataBind()
return ds.Tables("MyTable").Rows.Count
catch exp as SqlException
HttpContext.Current.Response.Write("Exception3")
End Try
End Function |