Solved

asp sql query to asp.net sql query

Posted on 2011-02-16
3
421 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

688 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