|
| |
|
|
kestu
Posts: 34 Joined: 11/8/2006 Status: offline
|
Access Database with Text Criteria - 11/8/2006 11:18:33
First - I did try to search for the answer and did read through the Spooky tuturial but couldn't find exactly what I was looking for, or maybe I wasn't interpretting it correctly. Anyway, I have a large access database that I am trying to use the DRW for. It is a database full of baseball statistics and I'm trying set the criteria to run on the player's name - BondsBa for example, but when the results wizard actually runs, it is incorporating every player into the results. So, for some reason, it's ignoring the criteria I have set up, or (more likely) I am not putting the name in the correct format. I've tried the following options: "bondsba" 'bondsba' [bondsba] (bondsba) I once even received a message saying that the criteria needed to be an integer. Any help would be appreciated. Thanks.
|
|
|
|
kestu
Posts: 34 Joined: 11/8/2006 Status: offline
|
RE: Access Database with Text Criteria - 11/8/2006 17:03:48
I'm using acces, not SQL? Do you want me to copy the code regardless?
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Access Database with Text Criteria - 11/8/2006 17:28:37
SQL string is the language that queries the database, not the database itself. SQL string means for example: SELECT * FROM tableName or UPDATE tblNAME SET (fldName = VariableValue) or INSERT INTO tblName (fld1, fld2, fld3) VALUES (variable1, variable2, variable3)
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
kestu
Posts: 34 Joined: 11/8/2006 Status: offline
|
RE: Access Database with Text Criteria - 11/9/2006 21:21:03
Ok - not sure i am understanding what you are looking for, but I'll try. Here is the code I used, does that help? <form runat="server"> <p><b><font color="#FFFFFF" size="5">Bonds, Barry</font></b></p> <asp:DataGrid ID="Region1" HeaderStyle-Font-Bold="" BorderWidth="0" AutoGenerateColumns="False" OnItemDataBound="Item_Bound" Runat="server" itemstyle-font-name="Georgia" itemstyle-font-italic="true" headerstyle-font-name="Georgia" itemstyle-backcolor="#FFFFFF" headerstyle-backcolor="#FFFFFF"> <Columns> <asp:BoundColumn DataField="birthYear" HeaderText="Birth Year"/> <asp:BoundColumn DataField="birthMonth" HeaderText="Birth Month"/> <asp:BoundColumn DataField="birthDay" HeaderText="Birth Day"/> <asp:BoundColumn DataField="birthCountry" HeaderText="Birth Country"/> <asp:BoundColumn DataField="birthState" HeaderText="Birth State"/> <asp:BoundColumn DataField="birthCity" HeaderText="Birth City"/> <asp:BoundColumn DataField="height" HeaderText="Height"/> <asp:BoundColumn DataField="weight" HeaderText="Weight"/> <asp:BoundColumn DataField="bats" HeaderText="Bats"/> <asp:BoundColumn DataField="throws" HeaderText="Throws"/> </Columns> </asp:DataGrid> <p> <asp:Label ID="Region1NoResults" Text="No records returned." Runat="server" Visible="False"></asp:Label><FPDB:DBRegion Target="Region1" DBName="lahman2" TableKey="lahmanID" RootPath="../" NoResults="Region1NoResults" TableName="Master" Where="" UserFields="Region1Query" MaxRecords="3" Runat="server"></FPDB:DBRegion></p> <p> </p> <p> </p> <div ID="Region0Fields" Runat="server"> </div> <FPDB:DBQuery ID="Region0Query" QuerySource="Region0Fields" Runat="server"></FPDB:DBQuery> <asp:DataGrid ID="Region0" ItemStyle-BackColor="LightGrey" AlternatingItemStyle-BackColor="White" HeaderStyle-Font-Bold="" BorderWidth="0" AutoGenerateColumns="False" OnItemDataBound="Item_Bound" Runat="server" itemstyle-font-name="Georgia" itemstyle-font-italic="true" headerstyle-font-name="Georgia"> <Columns> <asp:BoundColumn DataField="yearID" HeaderText="Year"/> <asp:BoundColumn DataField="teamID" HeaderText="Team"/> <asp:BoundColumn DataField="G" HeaderText="G"/> <asp:BoundColumn DataField="AB" HeaderText="AB"/> <asp:BoundColumn DataField="R" HeaderText="R"/> <asp:BoundColumn DataField="H" HeaderText="H"/> <asp:BoundColumn DataField="2B" HeaderText="2B"/> <asp:BoundColumn DataField="3B" HeaderText="3B"/> <asp:BoundColumn DataField="HR" HeaderText="HR"/> <asp:BoundColumn DataField="RBI" HeaderText="RBI"/> <asp:BoundColumn DataField="SB" HeaderText="SB"/> <asp:BoundColumn DataField="CS" HeaderText="CS"/> <asp:BoundColumn DataField="BB" HeaderText="BB"/> <asp:BoundColumn DataField="SO" HeaderText="SO"/> <asp:BoundColumn DataField="IBB" HeaderText="IBB"/> <asp:BoundColumn DataField="HBP" HeaderText="HBP"/> </Columns>
|
|
|
|
kestu
Posts: 34 Joined: 11/8/2006 Status: offline
|
RE: Access Database with Text Criteria - 11/9/2006 21:26:05
Or maybe this will help. This is the process I'm doing when setting up the DRW: 1) Using ASP.NET 2) Connected to existing database connection 3) Record Source = batting 4) I filtered out a bunch of unnecessary stats 5) Clicked on 'more options' 6) Clicked on 'criteria' 7) Clicked on 'add' 8) Set playerID to equal bondsba01 9) Set alternating colors, include header with column labels 10) Clicked on display all records together 11) Click Finish One weird thing that is happening is that the criteria I set up sometimes disappears. I'll go back in to edit it and nothing will be there.
|
|
|
|
kestu
Posts: 34 Joined: 11/8/2006 Status: offline
|
RE: Access Database with Text Criteria - 11/11/2006 23:50:27
Hello - I assume I didn't describe this properly?
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|