Solved

asp sql query to asp.net sql query

Posted on 2011-02-16
3
416 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
ID: 34911563
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
ID: 34911685
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
ID: 34911687
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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
Via a live example, show how to shrink a transaction log file down to a reasonable size.

863 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

19 Experts available now in Live!

Get 1:1 Help Now