Dim SqlCommand1 As New SqlClient.SqlCommand("select TE_zangyou .*,TR_syainID.syain_knm from TE_zangyou inner join TR_syainID on TR_syainID.syain_No = TE_zangyou.syain_No where TE_zangyou.syain_No = " + Request.QueryString("syain_No"), MyConn)
how bout in this code? if i have 3 primary keys.... should it be written like this:
Dim SqlCommand1 As New SqlClient.SqlCommand("select TE_zangyou .*,TR_syainID.syain_knm from TE_zangyou inner join TR_syainID on TR_syainID.syain_No = TE_zangyou.syain_No where
TE_zangyou.syain_No,TE_zangyou.date_kyou,TE_zangyou.time_kyou = " + Request.QueryString("syain_No,date_kyou,time_kyou"), MyConn)
the bold letters are the 3 primary keys of all my tables....
select TE_zangyou .*,TR_syainID.syain_knm from TE_zangyou
inner join TR_syainID on TR_syainID.syain_No = TE_zangyou.syain_No
where TE_zangyou.syain_No="+Request.QueryString("sysain_no") +" and TE_zangyou.date_kyou = "+ request.querystring("date_kyou")+" and TE_zangyou.time_kyou = " + Request.QueryString("time_kyou").
you'll pass three params like response.redirect("somepage.aspx?param1="+somevalue+"¶m2="+param2+"¶m3="+param3)
in the internet calling for another aspx is something like that but it produces some errors still...
Server Error in '/project_Ms' Application.
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
place first datanavigateurlformatstring then datanavigateurlfields, also see i've used ~/ which is used in case the next page is in same folder as the current page is.
in my case i can see view as hyperlink at design time itself.
natasha_arri...
Member
698 Points
343 Posts
Re: datagrid concern....
Nov 21, 2006 02:27 AM|LINK
Dim SqlCommand1 As New SqlClient.SqlCommand("select TE_zangyou .*,TR_syainID.syain_knm from TE_zangyou inner join TR_syainID on TR_syainID.syain_No = TE_zangyou.syain_No where TE_zangyou.syain_No = " + Request.QueryString("syain_No"), MyConn)
how bout in this code? if i have 3 primary keys.... should it be written like this:
Dim SqlCommand1 As New SqlClient.SqlCommand("select TE_zangyou .*,TR_syainID.syain_knm from TE_zangyou inner join TR_syainID on TR_syainID.syain_No = TE_zangyou.syain_No where TE_zangyou.syain_No,TE_zangyou.date_kyou,TE_zangyou.time_kyou = " + Request.QueryString("syain_No,date_kyou,time_kyou"), MyConn)
the bold letters are the 3 primary keys of all my tables....
satish_nagde...
Contributor
6572 Points
1432 Posts
Re: datagrid concern....
Nov 21, 2006 02:55 AM|LINK
hi,
it should be this way
select TE_zangyou .*,TR_syainID.syain_knm from TE_zangyou
inner join TR_syainID on TR_syainID.syain_No = TE_zangyou.syain_No
where TE_zangyou.syain_No="+Request.QueryString("sysain_no") +" and TE_zangyou.date_kyou = "+ request.querystring("date_kyou")+" and TE_zangyou.time_kyou = " + Request.QueryString("time_kyou").
you'll pass three params like response.redirect("somepage.aspx?param1="+somevalue+"¶m2="+param2+"¶m3="+param3)
hope it helps
regards,
satish.
natasha_arri...
Member
698 Points
343 Posts
Re: datagrid concern....
Nov 21, 2006 04:49 AM|LINK
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="syain_No" DataNavigateUrlFormatString="overtime_application_approval_inputt.aspx?syain_No={0}&date_kyou={1}&time_kyou={2}"
Text="View" />
in the internet calling for another aspx is something like that but it produces some errors still...
Server Error in '/project_Ms' Application.
Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Source Error:
Stack Trace:
satish_nagde...
Contributor
6572 Points
1432 Posts
Re: datagrid concern....
Nov 21, 2006 05:22 AM|LINK
hi grace,
here you go
<
asp:HyperLinkField DataNavigateUrlFormatString="~/details.aspx?au_id={0}&au_fname='{2}'&au_lname='{1}'" DataNavigateUrlFields="au_id, au_lname, au_fname" HeaderText="View Info" Text="View" />its just dummy page & au_?? are my temp fields '{1}' etc are for passing string data.
works like charm [:)].
regards,
satish.
natasha_arri...
Member
698 Points
343 Posts
Re: datagrid concern....
Nov 21, 2006 05:58 AM|LINK
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="syain_No,date_kyou,time_kyou" DataNavigateUrlFormatString="overtime_application_approval_inputt.aspx?syain_No={0}&date_kyou'{1}'&time_kyou'{2}'"
Text="View" />
thanks
it work and produces no error but "view"hyperlink doesnt link to the nest .aspx form.... hmmmm
view link just became an ordinary text...
satish_nagde...
Contributor
6572 Points
1432 Posts
Re: datagrid concern....
Nov 21, 2006 06:09 AM|LINK
try to use following
<asp:HyperLinkField DataNavigateUrlFormatString="~/overtime_application_approval_inputt.aspx?syain_No={0}&date_kyou'{1}'&time_kyou'{2}'" DataNavigateUrlFields="syain_No,date_kyou,time_kyou" Text="View" />
place first datanavigateurlformatstring then datanavigateurlfields, also see i've used ~/ which is used in case the next page is in same folder as the current page is.
in my case i can see view as hyperlink at design time itself.
regards,
satish.
natasha_arri...
Member
698 Points
343 Posts
Re: datagrid concern....
Nov 21, 2006 06:41 AM|LINK
still its not working.... i tried putting only two primary keys and it worked!
but if i add another one that makes them three primary the view link display an ordinary word.not a link...
why do u think so? does it have limitations?
natasha_arri...
Member
698 Points
343 Posts
Re: datagrid concern....
Nov 21, 2006 06:59 AM|LINK
i ahve given the exact code to my officemate and it worked for her....hmmm hmmm same as written in my code.....
satish_nagde...
Contributor
6572 Points
1432 Posts
Re: datagrid concern....
Nov 21, 2006 07:03 AM|LINK
so working finally right?
even its working here on my side.
thanks
satish.
natasha_arri...
Member
698 Points
343 Posts
Re: datagrid concern....
Nov 21, 2006 07:06 AM|LINK
<asp:HyperLinkField DataNavigateUrlFormatString="~/overtime_application_approval_inputt.aspx?syain_No={0}&date_kyou'{1}'&time_kyou'{2}'" DataNavigateUrlFields="syain_No,date_kyou,time_kyou" Text="View" />
this is my code but its not working for me....the view word doesnt have a link.
but when i pass it to my officemate it work for them,,,, hmmmm what do u think is the problm here?