ASP Database connection

Discussion in 'Software' started by be0, Jan 18, 2008.

  1. be0

    be0 Corporal

    Hello everyone. Can someone pelase explain to me what is up here? I looked at some code on the internet on how to connect to SQL Server database with ASP and use record sets. Can anyone explain to me more in detail. Here is what I have:

    Dim TheRS
    dim ConnTheRS
    dim strTheRS

    set TheRS = Server.CreateObject("ADODB.RecordSet")
    set ConnTheRS = Server.CreateObject("ADODB.Connection")
    PublicConst stTheRS = "Provider=SQL Server;User ID=sa;Password=password;Initial Catalog=config;Data Source=server8"
    ConnTheRS.Open(strTheRS)
    TheRs.Open sSQL, ConnTheRS

    I get this error no matter what I put for prodived. I tried {SQL Server} I tried SQLOLEDB.1 error at line 50 which is this statement:

    PublicConst stTheRS = "Provider=SQL Server;User ID=sa;Password=password;Initial Catalog=config;Data Source=server8"

    What is Provider= by the way?
    Here is the error:


    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified



    I can connect with ODBC i guess or OLEDB. Help pleaseeeeee...

    Thanks everyone

     
  2. Kodo

    Kodo SNATCHSQUATCH


MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds