connecting to SQL server 2008 from ASP page

Discussion in 'Databases' started by Nickfnord, Oct 8, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi All,

    I've recently downloaded SQL server 2008 and am trying to set up an ASP page connecting to it just for my own learning.

    I'm fairly new to SQL server administration and ASP in general although I am competant with databases in general... here's my issue:

    I've set up a DSN using windows NT authentication and it tests ok.

    The ASP page is fairly standard:

     
  2. Hi,
    I can help you with the connection to a SQL Server from ASP but let me ask...
    Did you add a SQL Server DB to your account?
    You can't use SQL Express here but you can use the Attach feature if you added SQL Server 2005 or 2008 to your accoount.
    Salute,
    Mark
     
  3. I'm really sorry but I'm not entirely sure what you're talking about - it's a sql server Express 2008 installation.... not sure what 'attaching it to my account' means.
     
  4. Hi,
    If you log into your Control Panel you see a section on the left for SQL Server addons.
    To use SQL Server databases here you have to add one of those options.
    Then if you are developing with SQL Server Express locally you have to migrate the data to that addon.
    Video #8 on this page shows one way to do this: http://iis7test.com/webcasts/
    With SQL Server 2008 Express you, for the first time in the line of SQL Express, can Export your records.

    If you're going to be using Classic ASP for your site and you don't expect a lot of traffic you might want to use Access.
    Either way you can do a lot with ASP but you can't simply use an Express database here as is, it has to be Attached or migrated.

    Whatever you need I'll try and help.
    Salute,
    Mark
     
  5. Bruce

    Bruce DiscountASP.NET Staff

  6. I'm having similar problem, I just got a sql server database and I'm using the connection string from the sample code you specified
    but I'm getting an error and I cannot connect.
    Below my connection string.

    cnnSimple.Open 'Provider=SQLOLEDB;Data Source=tcp:sql2k801.discountasp.net;' _
    & 'Initial Catalog=SQL2008_521646_lme2008;User Id=SQL2008_521646_lme2008_user;Password=******;' _
    & 'Connect Timeout=45;Network Library=dbmssocn;'
    Set rstSimple = cnnSimple.Execute('SELECT * FROM agencies ORDER BY agencyname')

    Any ideas??

    Regards,
    ALejandro.
     
  7. www.ankaranakliyat.org
    www.ankaraevdeneve.org
    www.nakliyatrehberi.org
     
  8. JorgeR

    JorgeR DiscountASP.NET Staff

    Create a support ticket from the control panel if you are still having issues. For the most part, the connection fails due to authentication. Please make sure that that the you are entering the correct username and password for the database


    junior

    DiscountASP.NET

    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page