eladr
asked on
another asp+
i used this code to populate sql server table in asp+
...
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim DS As DataSet
Dim MyConnection As ADOConnection
Dim MyCommand As ADODataSetCommand
dim strconn as string
dim strSQL as string
strconn ="DSN=test;uid=test;pwd=te sting;data base=eladr "
strSQL="select * from intercall"
MyConnection = New ADOConnection(strconn)
MyCommand = New ADODataSetCommand(strSQL,M yConnectio n)
DS = new DataSet()
MyCommand.FillDataSet(ds, "intercall")
MyDataGrid.DataSource=ds.T ables("int ercall").D efaultView
MyDataGrid.DataBind()
End Sub
</script>
...
how can i change the code to display only one filed and not all fields in db?
elad
...
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim DS As DataSet
Dim MyConnection As ADOConnection
Dim MyCommand As ADODataSetCommand
dim strconn as string
dim strSQL as string
strconn ="DSN=test;uid=test;pwd=te
strSQL="select * from intercall"
MyConnection = New ADOConnection(strconn)
MyCommand = New ADODataSetCommand(strSQL,M
DS = new DataSet()
MyCommand.FillDataSet(ds, "intercall")
MyDataGrid.DataSource=ds.T
MyDataGrid.DataBind()
End Sub
</script>
...
how can i change the code to display only one filed and not all fields in db?
elad
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is this the only way?
what are the other properties besides defaultView?
MyDataGrid.DataSource=ds.T ables("int ercall").D efaultView
elad
what are the other properties besides defaultView?
MyDataGrid.DataSource=ds.T
elad
ASKER
no one was specific with right answer
Does that mean you provide a 'C' grade ? You could delete the question ?
ASKER
i shouldnt accepted the que,but i saw EE cancel the
delete option.
elad
delete option.
elad
or
strSQL="select 1 from intercall"
depends what do you want to show