Solved

asp sql query to asp.net sql query

Posted on 2011-02-16
3
420 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Display SQL maintenance plan SQL Code 3 44
Easiest intro into .NET CORE? 2 32
mssql 7 32
Creating a Windows C++ program in visual studio 2015 5 29
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 ?
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

737 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