Solved

asp sql query to asp.net sql query

Posted on 2011-02-16
3
412 Views
Last Modified: 2013-11-26
I have a asp webpage working using the following sql query :

SELECT *  FROM tblFixtures  WHERE FixtureTeam LIKE '%" + Replace(rsFirstTeam__MMColParam, "'", "''") + "%' AND FixtureDate >= Now -1  ORDER BY FixtureDate ASC

using the following also :

<%
Dim rsFirstTeam__MMColParam
rsFirstTeam__MMColParam = "1st Team"
If (Request("MM_EmptyValue") <> "") Then
  rsFirstTeam__MMColParam = Request("MM_EmptyValue")
End If
%>

Following years of using Dreamweaver and asp, I now need to convert existing pages to asp.net - How should my asp.net datasource SelectCommand  query look?

As you can tell from my question, I am not very experienced. Dreamweaver query created using gui
0
Comment
Question by:Swn-Y-Mor
  • 3
3 Comments
 

Author Comment

by:Swn-Y-Mor
Comment Utility
Ah OK. I managed to find the Query Builder within VS 2008 and managed to get this sql query :-

"SELECT FixtureDate, FixtureDay, FixtureType, FixtureTeam, HomeTeam, AwayTeam, HomeAway, KickOff FROM tblFixtures WHERE (FixtureTeam = '1st Team') ORDER BY FixtureDate DESC"

 ... but I need to show the next fixture ie Now -1 but not sure how?
0
 

Author Comment

by:Swn-Y-Mor
Comment Utility
OK Sorry!
I answered my own question. I guess I was just being lazy posting a question on here without trying myself first
0
 

Accepted Solution

by:
Swn-Y-Mor earned 0 total points
Comment Utility
SELECT FixtureDate, FixtureDay, FixtureType, FixtureTeam, HomeTeam, AwayTeam, HomeAway, KickOff FROM tblFixtures WHERE (FixtureTeam = '1st Team') AND (FixtureDate &gt;= Now - 1) ORDER BY FixtureDate
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now