[dba-VB] QueryStringParameter error

Eric Barro ebarro at verizon.net
Fri Jul 31 23:48:26 CDT 2009


 Francico, 

I haven't really worked with the syntax you show below but I've seen a buddy
of mine use it as well. Try and put Response.Write(intLanguage) in your code
to debug and see if it is passing the value. 

Eric

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia
Sent: Wednesday, July 29, 2009 9:39 PM
To: Discussion concerning Visual Basic and related programming issues.
Subject: [dba-VB] QueryStringParameter error

Hi,
  I've not been active on this list at all, but I do have a quick question
someone here may have already ran into.  I am working on an ASP.NET (visual
studio 2008) and I created a few pages that all work fairly similarly, where
there is a GridView on the main Entity page, and Add pages along with Edit
pages created with Details View controls.  In the GridView page, I add an
edit button and the link points the
~/language/EditLanguage.aspx?intLanguage={0}.  On the receiving page I
edited the SELECT command with the proper WHERE clause as WHERE intLanguage=
@intLanguage.  The QueryStringParameter is as follows:
<SelectParameters>
            <asp:QueryStringParameter Name="intLanguage"
QueryStringField="intLanguage" />
        </SelectParameters>

so this is the same for my other pages such as my Release page and my
Category page and both work fine, but the language page is different... the
PKID is the intLanguage field, but it's not an autoincremented number (since
this project is still in it's infancy, I've thought about adding a true
surrogate PKID and see if that is the problem...

note, If i edit the select command w/o the where, the page loads fine (well
w/o the parameter being passed so my DetailsView control only displays the
first record in the recordset, I'm new to ASP.NET and don't really know how
to troubleshoot this.... any ideas?

-Francisco
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list