Ask a Question related to ASP Database, Design and Development.
-
Chad S #1
ASP Dynamic List Check If Exist
Hello,
Here's a good one for you guys. I appreciate any help you can provide.
ClinShipPartNumber.asp
Currently I have this page which displays a listing of part numbers in
my database. I'm looping through the recordset and counting at the same
time and assigning the unique number to the name of the checkbox so I
can add and update within my database. All this is working great.
sSQL = SELECT * FROM tblItemMaster
<%
iCount = 0
Do While NOT rsPartListing.EOF
%>
<input type="checkbox" name="ckPartNumber<%=iCount%>"
value="<%=rsPartListing("PartNumber")%>">
<%=rsPartListing("PartNumber")%>
<%=rsPartListing("Description")%>
<%
iCount = iCount + 1
rsPartListing.MoveNext
%>
What I want to do is check and see if that particular part number is
entered into another table. If so I want to automatically check that
box, while still displaying the other possible part numbers. I'm having
difficulty comparing the two values, while still looping through both
tables.
Any thoughts ?
Thanks,
Chad
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Chad S Guest
-
Newbie, how to check if a value in a gridview cell already exist in database
Hi I've the following dataset bound to my gridview <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$... -
Check if username exist alternative..? please help
Hi - using ASP/Access/Vbscript Want to use a alternative of the DW check if username exist behaviour. I have a insert record form on my page.... -
Fonts in list that do not exist FHMXa-Panther
Actually 2 things: We have some FH10 docs we are opening in MXa. The document has a font reference to B Futura. There is no B Futura on the... -
truly dynamic check boxes
I am using FMP 6. Is there a way to mimic check boxes functionality so that the checked information can be easily edited rather have the rigid... -
SCO OpenServer 5.0.x -- Exist a command who check a which files are modified, update or change into a directory ?
SCO OpenServer 5.0.x -- Exist a command who check a which files are modified, update or change into a directory ? Thanks in advance. Francisco -
Chris Hohmann #2
Re: ASP Dynamic List Check If Exist
"Chad S" <webaccess@hotmail.com> wrote in message
news:%23C7llI0QEHA.904@TK2MSFTNGP12.phx.gbl...Left join the tblItemMaster table to the "other" table and include an> Hello,
>
> Here's a good one for you guys. I appreciate any help you can provide.
>
> ClinShipPartNumber.asp
>
> Currently I have this page which displays a listing of part numbers in
> my database. I'm looping through the recordset and counting at the same
> time and assigning the unique number to the name of the checkbox so I
> can add and update within my database. All this is working great.
>
> sSQL = SELECT * FROM tblItemMaster
>
> <%
> iCount = 0
> Do While NOT rsPartListing.EOF
> %>
> <input type="checkbox" name="ckPartNumber<%=iCount%>"
> value="<%=rsPartListing("PartNumber")%>">
> <%=rsPartListing("PartNumber")%>
> <%=rsPartListing("Description")%>
> <%
> iCount = iCount + 1
> rsPartListing.MoveNext
> %>
>
> What I want to do is check and see if that particular part number is
> entered into another table. If so I want to automatically check that
> box, while still displaying the other possible part numbers. I'm having
> difficulty comparing the two values, while still looping through both
> tables.
>
> Any thoughts ?
>
> Thanks,
> Chad
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
expression in the column list of the select statement that indicates whether
the part number in the other table is null. Then when you iterate through
the recordset, output a "checked" attribute in the input tag if the
is_other_table_part_number_null field is false. You may also want to
consider using the GetRows method of the Recordset object and iterate
through the resulting array instead of iterating through the recordset.
Also, you should avoid using "SELECT *". You may even want to use some type
of stored procedure/parameterized query. Finally, when posting a database
related question, please include which database and version you are using
along with data definition language, sample data and desired output/results.
Here are some articles:
[url]http://aspfaq.com/show.asp?id=2467[/url]
[url]http://aspfaq.com/show.asp?id=2096[/url]
[url]http://aspfaq.com/show.asp?id=2201[/url]
[url]http://aspfaq.com/etiquette.asp?id=5006[/url]
HTH
-Chris Hohmann
Chris Hohmann Guest



Reply With Quote

