Click here to Skip to main content
15,888,968 members
Home / Discussions / Database
   

Database

 
AnswerRe: increment number Pin
mahsa shahi1-Mar-14 7:09
mahsa shahi1-Mar-14 7:09 
Questioncategory tree like structure in sql Pin
S.Dhanasekaran28-Oct-08 21:13
S.Dhanasekaran28-Oct-08 21:13 
AnswerRe: category tree like structure in sql Pin
Wendelius29-Oct-08 8:00
mentorWendelius29-Oct-08 8:00 
Question[Message Deleted] Pin
kyi kyi28-Oct-08 17:22
kyi kyi28-Oct-08 17:22 
AnswerRe: Function problem Pin
balaji.t28-Oct-08 22:17
balaji.t28-Oct-08 22:17 
Questionmanaging database queries Pin
DSPCottage28-Oct-08 10:36
DSPCottage28-Oct-08 10:36 
QuestionSaving changes to a database via Windows forms Pin
danielhasdibs28-Oct-08 7:01
danielhasdibs28-Oct-08 7:01 
QuestionProblem with query pulling from AS400 Pin
missyd28-Oct-08 6:52
missyd28-Oct-08 6:52 
I am able to pull the correct data in SQLDS1 for the dropdownlist. And, it seems as though SQLDS2 is pulling the correct data in the gridview. However, when selecting from the gridview to populate the detailsview, it only uses the rdb1aa field and i need it to be able to match the selected row data from rdb1aa and rdb2aa with two fields I am selecting from the JOIN in SQLDS3.
If anyone can help, I sure would appreciate it. My code is as follows:




Choose an Area of Study:



<asp:dropdownlist id="ddlPrefix" runat="server" datasourceid="SQLDS1" autopostback="true" datatextfield="rdb1aa" xmlns:asp="#unknown">




<asp:gridview runat="server" id="gvCourse" cellpadding="0" datasourceid="SQLDS2" datakeynames="rdb1aa" autogeneratecolumns="False" font-names="Arial" width="371px" allowpaging="True" pagesize="16" xmlns:asp="#unknown">
<footerstyle backcolor="#D59F0F" font-bold="True" forecolor="White">
<rowstyle backcolor="#FFFBD6" forecolor="#333333">
<pagerstyle backcolor="#D59F0F" forecolor="#333333" horizontalalign="Center">
<selectedrowstyle backcolor="#D59F0F" font-bold="True" forecolor="Navy">
<headerstyle backcolor="#820024" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="White">
<headerstyle backcolor="#820024" font-bold="True" forecolor="White">
<columns> <asp:commandfield showselectbutton="true">
<asp:boundfield datafield="rdb1aa" headertext="Prefix" readonly="true">
<asp:boundfield datafield="rdb2aa" headertext="Number" readonly="true">
<asp:boundfield datafield="rdi8aa" headertext="Title" readonly="true">


<asp:detailsview datasourceid="SQLDS3" cellpadding="2" headerstyle-backcolor="#BDCFE7" headertext="Course Description" autogeneraterows="False" id="dvDesc" runat="server" height="186px" width="164px" forecolor="#333333" gridlines="None" horizontalalign="Center" xmlns:asp="#unknown">

<footerstyle backcolor="#5D7B9D" font-bold="True" forecolor="White">
<commandrowstyle backcolor="#E2DED6" font-bold="True">
<rowstyle backcolor="#F7F6F3" forecolor="#333333">
<fieldheaderstyle backcolor="#820024" font-bold="True">
<pagerstyle backcolor="#284775" forecolor="White" horizontalalign="Center">
<fields>
<asp:boundfield datafield="r3raak" nulldisplaytext="No Description Found">
<headerstyle height="1px" horizontalalign="Left" verticalalign="Top">
<itemstyle font-bold="True" font-size="XX-Small" height="15px" horizontalalign="Left" verticalalign="Top">




<headerstyle backcolor="#D59F0F" font-bold="True" forecolor="White">
Font-Size="Small" Height="1px" HorizontalAlign="Center">
<editrowstyle backcolor="#999999">
<alternatingrowstyle backcolor="White" forecolor="#284775">


<asp:sqldatasource id="SQLDS1" connectionstring="<%$ ConnectionStrings:ConnectionString %>" xmlns:asp="#unknown">
SelectCommand="SELECT distinct RDB1AA from (select rdb1aa,rdb2aa from OPENQUERY (as400 , 'select rdb1aa, rdb2aa from shwcmfil.catmsp WHERE RDJHAA = ''A'' AND RDB8AA = ''AC''')) AS derivedtbl_1 ORDER BY RDB1AA" Runat="Server">


<asp:sqldatasource id="SQLDS2" runat="server" connectionstring="<%$ ConnectionStrings:ConnectionString %>" xmlns:asp="#unknown">
SelectCommand="SELECT RDB1AA, RDB2AA, RDI8AA FROM OPENQUERY (as400 , 'select * from shwcmfil.catmsp WHERE RDJHAA = ''A''') AS derivedtbl_1 WHERE (RDB1AA = @rdb1aa) ORDER BY RDB2AA">
<selectparameters>
<asp:controlparameter controlid="ddlPrefix" name="rdb1aa" propertyname="SelectedValue">



<asp:sqldatasource id="SQLDS3" connectionstring="<%$ ConnectionStrings:ConnectionString %>" runat="server" xmlns:asp="#unknown">
SelectCommand="SELECT RDB1AA, RDB2AA, RDI8AA, R3RAAK, R3IXAA FROM OPENQUERY (as400 , 'select * from shwcmfil.catmsp
JOIN shwcmfil.catxtp on (shwcmfil.catmsp.rdb1aa = shwcmfil.catxtp.r3b1aa and shwcmfil.catxtp.r3b2aa = shwcmfil.catmsp.rdb2aa)WHERE RDJHAA = ''A''') AS derivedtbl_1 WHERE (RDB1AA = @rdb1aa)">
<selectparameters>
<asp:controlparameter controlid="gvCourse" name="rdb1aa" propertyname="SelectedValue" type="String">
<asp:controlparameter controlid="gvCourse" name="rdb2aa" propertyname="SelectedValue" type="String">


Questionexplain entity storingduef Pin
Member 564239427-Oct-08 21:03
Member 564239427-Oct-08 21:03 
QuestionEmbedding Pin
AnieMVC27-Oct-08 18:59
AnieMVC27-Oct-08 18:59 
QuestionMYSQL Help is needed Pin
Rameez Raja27-Oct-08 18:44
Rameez Raja27-Oct-08 18:44 
AnswerRe: MYSQL Help is needed Pin
Blue_Boy28-Oct-08 0:22
Blue_Boy28-Oct-08 0:22 
QuestionHow to Check Existing Record first then Insert otherwise update statement Pin
zjaffary27-Oct-08 16:57
zjaffary27-Oct-08 16:57 
AnswerRe: How to Check Existing Record first then Insert otherwise update statement Pin
Blue_Boy28-Oct-08 0:20
Blue_Boy28-Oct-08 0:20 
AnswerRe: How to Check Existing Record first then Insert otherwise update statement Pin
Tim Carmichael28-Oct-08 2:02
Tim Carmichael28-Oct-08 2:02 
QuestionCopying data in one table to specific fields in another table Pin
Member 365120927-Oct-08 1:22
Member 365120927-Oct-08 1:22 
AnswerRe: Copying data in one table to specific fields in another table Pin
Wendelius27-Oct-08 10:00
mentorWendelius27-Oct-08 10:00 
QuestionError:The cursor does not include the table being modified or the table is not updatable through the cursor Pin
V K 226-Oct-08 19:19
V K 226-Oct-08 19:19 
AnswerCross-post (3/3) Pin
Wendelius27-Oct-08 9:21
mentorWendelius27-Oct-08 9:21 
AnswerCP IGNORE THIS USER Pin
leckey27-Oct-08 10:00
leckey27-Oct-08 10:00 
QuestionProblem : Retrive Data with ref table Pin
Ahmed R El Bohoty26-Oct-08 1:14
Ahmed R El Bohoty26-Oct-08 1:14 
AnswerRe: Problem : Retrive Data with ref table Pin
Wendelius26-Oct-08 1:34
mentorWendelius26-Oct-08 1:34 
QuestionRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty26-Oct-08 1:53
Ahmed R El Bohoty26-Oct-08 1:53 
AnswerRe: Problem : Retrive Data with ref table Pin
Wendelius26-Oct-08 2:06
mentorWendelius26-Oct-08 2:06 
GeneralRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty26-Oct-08 4:21
Ahmed R El Bohoty26-Oct-08 4:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.