N
.Net Sports
I'm able to display the lname and fname variables in my datagrid ,
using the below sql string
strSQLQuery = "SELECT fname + ' ' + lname AS Name, cust_id " _
& "FROM tblcusttag " _
& "WHERE lname LIKE '%" & Replace
(strSearch, "'", "''") _
& "%' " _
& "AND fname LIKE '%" & strSearch2 _
& "%' " _
& "ORDER BY lname;"
users enter both a first name and last name in 2 text boxes. In another
script with the sql string:
strSQLQuery = "SELECT fname + ' ' + lname AS Name, phoneNum, cust_id "
_
& "FROM tblcusttag " _
"WHERE phoneNum LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "ORDER BY lname;"
and only using an input box for the users to enter a phone number to
query, I do not see the Name (or lname nor fname) in the Datagrid
display:
<asp
ataGrid id="dgCustName" runat="server"
Headerstyle-BackColor="#48546a"
Headerstyle-ForeColor="#c0c0c0"
Headerstyle-Font-Name="Arial"
Headerstyle-Font-Size="14"
Headerstyle-Font-Bold="true"
/>
<columns>
<asp:BoundColumn
DataField="cust_id"
HeaderText="Customer ID"
ReadOnly="true">
</asp:BoundColumn>
<asp:BoundColumn
DataField="Lname"
HeaderText="Last Name">
</asp:BoundColumn>
<asp:BoundColumn
DataField="Fname"
HeaderText="First Name">
</asp:BoundColumn>
<asp:BoundColumn
DataField="phoneNum"
HeaderText="Phone #">
</asp:BoundColumn>
</columns>
</asp
ataGrid>
The datagrid is configured the same exact way for the
firstName/lastname script; both customer ids are displayed in each of
the datagrids
TIA
..netSports
using the below sql string
strSQLQuery = "SELECT fname + ' ' + lname AS Name, cust_id " _
& "FROM tblcusttag " _
& "WHERE lname LIKE '%" & Replace
(strSearch, "'", "''") _
& "%' " _
& "AND fname LIKE '%" & strSearch2 _
& "%' " _
& "ORDER BY lname;"
users enter both a first name and last name in 2 text boxes. In another
script with the sql string:
strSQLQuery = "SELECT fname + ' ' + lname AS Name, phoneNum, cust_id "
_
& "FROM tblcusttag " _
"WHERE phoneNum LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "ORDER BY lname;"
and only using an input box for the users to enter a phone number to
query, I do not see the Name (or lname nor fname) in the Datagrid
display:
<asp
Headerstyle-BackColor="#48546a"
Headerstyle-ForeColor="#c0c0c0"
Headerstyle-Font-Name="Arial"
Headerstyle-Font-Size="14"
Headerstyle-Font-Bold="true"
/>
<columns>
<asp:BoundColumn
DataField="cust_id"
HeaderText="Customer ID"
ReadOnly="true">
</asp:BoundColumn>
<asp:BoundColumn
DataField="Lname"
HeaderText="Last Name">
</asp:BoundColumn>
<asp:BoundColumn
DataField="Fname"
HeaderText="First Name">
</asp:BoundColumn>
<asp:BoundColumn
DataField="phoneNum"
HeaderText="Phone #">
</asp:BoundColumn>
</columns>
</asp
The datagrid is configured the same exact way for the
firstName/lastname script; both customer ids are displayed in each of
the datagrids
TIA
..netSports