User Profile

Collapse

Profile Sidebar

Collapse
dibwas
dibwas
Last Activity: Apr 27 '11, 02:23 PM
Joined: Apr 15 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dibwas
    started a topic Getting error in mssql database query - Date

    Getting error in mssql database query - Date

    Code:
    SELECT COUNT(*) AS NumberOfRows FROM a_poll_votes 
    WHERE QUESTION_ID='1' 
    AND DATE_SUB(CURDATE(),INTERVAL 0 DAY) <= DATE_FORMAT(DT, '%Y-%m-%d') 
    AND IP='111.111.1.1'
    I think I am making mistake here:

    DATE_SUB(CURDAT E(),INTERVAL 0 DAY) <= DATE_FORMAT(DT, '%Y-%m-%d')

    Can anbody plz help me.

    This needs to be in asp and mssql

    Thanks
    See more | Go to post

  • Hii,

    Thanks for replying.

    I have used datagrid view... and that works correct..

    I didn't knew I could design a datagrid.. so I was trying to generate HTML code instead.

    Below is the code with datagrid that worked.

    Code:
    <%@ Page Language="c#" %>
    <%@ import Namespace="System.Data" %>
    <%@ import Namespace="System.Data.SqlClient"
    ...
    See more | Go to post

    Leave a comment:


  • display SqlDataReader values bound to labels MSSQL C#

    I have very limited knowledge on asp .net using c#. I am trying to fetch data from my mssql database and display the value on my page. I have succeeded to display it using datagrid. But I want it to diplay attached to labels or text boxes.

    Below is the code that I have made but it is throwing error

    Code:
    <%@ Page Language="c#" %>
    <%@ import Namespace="System.Data" %>
    <%@ import
    ...
    See more | Go to post
No activity results to display
Show More
Working...