[DUG] Delphi .Net question
Jeremy Coulter
vss at vss.co.nz
Wed Jan 3 14:03:21 NZDT 2007
Hi all.
I have a couple of days to look at some .net stuff.
I am going to convert a current ASP site (4 pages) to .Net.
I have a DBGrid I want to populate froma stored procedure, and currently it
works, BUT the fields displayed on the screen are NOT the ones defined in
the .aspx file,
<ASP:DataGrid id="DataGrid1" runat="server">
<Columns>
<ASP:BoundColumn datafield="patient"
headertext="Patient"></ASP:BoundColumn>
<ASP:BoundColumn datafield="APPLICATION_DATE"
headertext="Date"></ASP:BoundColumn>
<ASP:BoundColumn datafield="Doctor"
headertext="Doctor"></ASP:BoundColumn>
<ASP:BoundColumn datafield="SURGERY"
headertext="Surgery"></ASP:BoundColumn>
<ASP:BoundColumn datafield="CANCER"
headertext="Cancer"></ASP:BoundColumn>
</Columns></ASP:DataGrid></p>
what I get is ALL the fields returned.
This is my code. can anyoen see WHY I get the result I get ?
SqlConnection1 := SQLConnection.create(sConstr);
sqlDA := SQLDataAdapter.Create('EXEC PEP_SSB_Registration_Summary_lsp
1',SqlConnection1);
ds := Dataset.create;
sqlDA.Fill(ds);
DataGrid1.DataSource:=Ds;
DataGrid1.Columns.Clear;
DataGrid1.DataKeyField:='SSB_APPLICATION_ID';
DataBind;
Thanks, Jeremy
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.3/614 - Release Date: 02/01/2007
14:58
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20070103/5927af73/attachment.html
More information about the Delphi
mailing list