05-02-06 12:17 PM
Remove spaces from field names in the database, or in the SQL
statement, surround the field name in square brackets.
fp_sQry="SELECT * FROM Drills WHERE ([Drill Category] = 'Shooting' OR
[Drill Cateogry 2] = 'Shooting' OR [Drill Cateogry 3] = 'Shooting' O
R
[Drill Cateogry 4] = 'Shooting') ORDER BY [Drill Name] ASC"
should work - change this in the grey code of the page - but it is
better to do things correctly and eliminate the spaces.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
"Chris" <Chris@discussions.microsoft.com> wrote in message
news:11498903-985D-406E-8D27-D2570455F884@microsoft.com...
> My host moved me to a new server and my DRW asp results pages were
> displaying
> just fine as they have for the last several years and the last week
> on the
> new server as well.
>
> Now, I get a No records returned. I have not changed the database
> nor I have
> I changed the code so I must believe it's something my host did.
> They have
> reset permissions and other small issues for me.
>
> The thing is, I can get the records to return if I use a custom SQL
> statement from Access.
>
> Here is the original DRW SQL statement that quit working:
> fp_sQry="SELECT * FROM Drills WHERE (""Drill Category"" = 'Shooting'
> OR
> ""Drill Cateogry 2"" = 'Shooting' OR ""Drill Cateogry 3"" =
> 'Shooting' OR
> ""Drill Cateogry 4"" = 'Shooting') ORDER BY ""Drill Name"" ASC"
>
> Here is the SQL statement from the Access database that works in FP
> and on
> my site so had to change them to this.
> fp_sQry="SELECT * FROM Drills WHERE (((Drills.[Drill
> Category])=""shooting"")) OR (((""Drill Cateogry 2"")=""shooting""))
> OR
> (((""Drill Cateogry 3"")=""shooting"")) OR (((""Drill Cateogry
> 4"")=""shooting"")) ORDER BY Drills.[Drill Name]; "
>
> Any ideas as to what they changed that causes the DRW not to work.
> I've
> tried creating new pages with the DRW but they all come up No
> Records
> Returned. It's much more work to have to download the Access
> database and
> put it the custom queries.
[ Post a follow-up to this message ]
|