SQL 2005 ~ ASP

  • Is this the right place for this query?

    Folks, I jus need to write a simple ASP page to pull records [either select, view results from sql 2005 and display it on web page]....

    Ideally, I would make the asp page for reporting purpose... I understand this cant be answered here...jsut give me the pointers [useful url's, link to some sites] for me to get started.....

    Thanks for the help here...


    Get busy living ....or get busy dying....

  • Please don't post the same question in multiple forums. It's been answered in another forum already.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • Here's the basics.  This will loop thru all the records in a table and display them one at a time.

    <%SET Connect=Server.CreateObject("ADODB.CONNECTION")

     

    DSNTemp = "driver={SQL Server};server=yourservername;uid=yourusername;pwd=yourpassword;database=yourdatabasename"

     

    connect.Open DSNTemp

     

    SET onwhatever=Connect.Execute("SELECT * FROM yourtablehere”)

     

    Do WHILE NOT onwhatever.EOF

     

    Onwhatever.fields("fieldnamehere").value

     

    onwhatever.MoveNext

    Loop

    %>

     

    Good sources for ASP include the Wrox books (if you can tolerate the miserable indexes they have).  Surprisingly, ASP For Dummies and Teach Yourself ASP in 24 Hours are both fairly comprehensive for beginner books.

     

    HTH

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply