I'm retarded please help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jegray
    New Member
    • Nov 2006
    • 3

    I'm retarded please help

    I am very much a beginner in dealing with connection statments. I am getting the following error:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

    /default.asp, line 32



    Here is my connection include:


    <%
    FileName="Conne ction_odbc_conn _dsn.htm"
    Type="ADO"
    HTTP="false"
    Catalog=""
    Schema=""
    var MM_connCustomer s_STRING = "dsn=access_cus tomers2.dsn;"
    %>

    Here is my javascript page coding:

    <%@LANGUAGE="JA VASCRIPT"%>

    <!--#include file="Connectio ns/connCustomers.a sp" -->
    <script language=vbscri pt runat=server>
    cr = Request.Form("c bxRemember")
    If (cr = "yes") Then
    Response.Cookie s("ckPassword ") = Request.Form("t xtPassword")
    Response.Cookie s("ckPassword") .Expires = Date + 90

    End If

    </script>
    <script language=vbscri pt runat=server>
    cr = Request.Form("c bxRemember")
    If (cr = "yes") Then
    Response.Cookie s("ckUserID") = Request.Form("t xtusername")
    Response.Cookie s("ckUserID").E xpires = Date + 90

    End If

    </script>
    <%
    var rsLogin = Server.CreateOb ject("ADODB.Rec ordset");
    rsLogin.ActiveC onnection = MM_connCustomer s_STRING;
    rsLogin.Source = "SELECT * FROM customers";
    rsLogin.CursorT ype = 0;
    rsLogin.CursorL ocation = 2;
    rsLogin.LockTyp e = 3;
    rsLogin.Open();
    rsLogin_numRows = 0;
    %>
    <%
    // *** Validate request to log in to this site.
    var MM_LoginAction = Request.ServerV ariables("URL") ;
    if (Request.QueryS tring!="") MM_LoginAction += "?" + Request.QuerySt ring;
    var MM_valUsername= String(Request. Form("txtuserna me"));
    if (MM_valUsername != "undefined" ) {
    var MM_fldUserAutho rization="Acces sGroup";
    var MM_redirectLogi nSuccess="Login OK.asp";
    var MM_redirectLogi nFailed="Regist er.asp";
    var MM_flag="ADODB. Recordset";
    var MM_rsUser = Server.CreateOb ject(MM_flag);
    MM_rsUser.Activ eConnection = MM_connCustomer s_STRING;
    MM_rsUser.Sourc e = "SELECT ID, UserID, Password, AccessGroup, PA, ITB, PDA, UNV1, UNV2, UNV3, UNV4, UNV5, UNV6, UNV7, ICMS, CFocus, Formation";
    if (MM_fldUserAuth orization != "") MM_rsUser.Sourc e += "," + MM_fldUserAutho rization;
    MM_rsUser.Sourc e += " FROM customers WHERE UserID='" + MM_valUsername + "' AND Password='" + String(Request. Form("txtpasswo rd")) + "'";
    MM_rsUser.Curso rType = 0;
    MM_rsUser.Curso rLocation = 2;
    MM_rsUser.LockT ype = 3;
    MM_rsUser.Open( );
    if (!MM_rsUser.EOF || !MM_rsUser.BOF) {
    // username and password match - this is a valid user
    Session("MM_Use rname") = MM_valUsername;
    Session('svID') = MM_rsUser.Field s('ID').Value;
    Session('svAcce ssGroup') = MM_rsUser.Field s('AccessGroup' ).Value
    Session('svPA') = MM_rsUser.Field s('PA').Value;
    Session('svITB' ) = MM_rsUser.Field s('ITB').Value;
    Session('svPDA' ) = MM_rsUser.Field s('PDA').Value;
    Session('svUNV1 ') = MM_rsUser.Field s('UNV1').Value ;
    Session('svUNV2 ') = MM_rsUser.Field s('UNV2').Value ;
    Session('svUNV3 ') = MM_rsUser.Field s('UNV3').Value ;
    Session('svUNV4 ') = MM_rsUser.Field s('UNV4').Value ;
    Session('svUNV5 ') = MM_rsUser.Field s('UNV5').Value ;
    Session('svUNV6 ') = MM_rsUser.Field s('UNV6').Value ;
    Session('svUNV7 ') = MM_rsUser.Field s('UNV7').Value ;
    Session('svICMS ') = MM_rsUser.Field s('ICMS').Value ;
    Session('svFocu s') = MM_rsUser.Field s('CFocus').Val ue;
    Session('svForm ation') = MM_rsUser.Field s('Formation'). Value;
    if (MM_fldUserAuth orization != "") {
    Session("MM_Use rAuthorization" ) = String(MM_rsUse r.Fields.Item(M M_fldUserAuthor ization).Value) ;
    } else {
    Session("MM_Use rAuthorization" ) = "";
    }
    if (String(Request .QueryString("a ccessdenied")) != "undefined" && true) {
    MM_redirectLogi nSuccess = Request.QuerySt ring("accessden ied");
    }
    MM_rsUser.Close ();
    Response.Redire ct(MM_redirectL oginSuccess);
    }
    MM_rsUser.Close ();
    Response.Redire ct(MM_redirectL oginFailed);
    }
    %>
    <script language=vbscri pt runat=server>
    ' *** Set A Session Variable
    ' *** MagicBeat Server Behavior - 2006 - by Jag S. Sidhu - www.magicbeat.c om

    </script>

    The site is bieng hosted by godaddy and a valid dsn is in place under the name:
    access_customer s2.dsn

    Please help this is driving me nuts. It will serve to be a login and customer information update.

    Thanks
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    I think that you can use the ODBC to link your external tables fto Access and then you can treat them as an ordinary Acces table :)

    Comment

    • miata718
      New Member
      • Dec 2006
      • 1

      #3
      I got the same problem like u, unfortunately godaddy.com's tech support is helpless, plus no refund if cancel, totally rip off. I beleive godaddy.com should help us to setup the site and make it work in order to earn our business.



      Originally posted by jegray
      I am very much a beginner in dealing with connection statments. I am getting the following error:

      Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

      /default.asp, line 32



      Here is my connection include:


      <%
      FileName="Conne ction_odbc_conn _dsn.htm"
      Type="ADO"
      HTTP="false"
      Catalog=""
      Schema=""
      var MM_connCustomer s_STRING = "dsn=access_cus tomers2.dsn;"
      %>

      Here is my javascript page coding:

      <%@LANGUAGE="JA VASCRIPT"%>

      <!--#include file="Connectio ns/connCustomers.a sp" -->
      <script language=vbscri pt runat=server>
      cr = Request.Form("c bxRemember")
      If (cr = "yes") Then
      Response.Cookie s("ckPassword ") = Request.Form("t xtPassword")
      Response.Cookie s("ckPassword") .Expires = Date + 90

      End If

      </script>
      <script language=vbscri pt runat=server>
      cr = Request.Form("c bxRemember")
      If (cr = "yes") Then
      Response.Cookie s("ckUserID") = Request.Form("t xtusername")
      Response.Cookie s("ckUserID").E xpires = Date + 90

      End If

      </script>
      <%
      var rsLogin = Server.CreateOb ject("ADODB.Rec ordset");
      rsLogin.ActiveC onnection = MM_connCustomer s_STRING;
      rsLogin.Source = "SELECT * FROM customers";
      rsLogin.CursorT ype = 0;
      rsLogin.CursorL ocation = 2;
      rsLogin.LockTyp e = 3;
      rsLogin.Open();
      rsLogin_numRows = 0;
      %>
      <%
      // *** Validate request to log in to this site.
      var MM_LoginAction = Request.ServerV ariables("URL") ;
      if (Request.QueryS tring!="") MM_LoginAction += "?" + Request.QuerySt ring;
      var MM_valUsername= String(Request. Form("txtuserna me"));
      if (MM_valUsername != "undefined" ) {
      var MM_fldUserAutho rization="Acces sGroup";
      var MM_redirectLogi nSuccess="Login OK.asp";
      var MM_redirectLogi nFailed="Regist er.asp";
      var MM_flag="ADODB. Recordset";
      var MM_rsUser = Server.CreateOb ject(MM_flag);
      MM_rsUser.Activ eConnection = MM_connCustomer s_STRING;
      MM_rsUser.Sourc e = "SELECT ID, UserID, Password, AccessGroup, PA, ITB, PDA, UNV1, UNV2, UNV3, UNV4, UNV5, UNV6, UNV7, ICMS, CFocus, Formation";
      if (MM_fldUserAuth orization != "") MM_rsUser.Sourc e += "," + MM_fldUserAutho rization;
      MM_rsUser.Sourc e += " FROM customers WHERE UserID='" + MM_valUsername + "' AND Password='" + String(Request. Form("txtpasswo rd")) + "'";
      MM_rsUser.Curso rType = 0;
      MM_rsUser.Curso rLocation = 2;
      MM_rsUser.LockT ype = 3;
      MM_rsUser.Open( );
      if (!MM_rsUser.EOF || !MM_rsUser.BOF) {
      // username and password match - this is a valid user
      Session("MM_Use rname") = MM_valUsername;
      Session('svID') = MM_rsUser.Field s('ID').Value;
      Session('svAcce ssGroup') = MM_rsUser.Field s('AccessGroup' ).Value
      Session('svPA') = MM_rsUser.Field s('PA').Value;
      Session('svITB' ) = MM_rsUser.Field s('ITB').Value;
      Session('svPDA' ) = MM_rsUser.Field s('PDA').Value;
      Session('svUNV1 ') = MM_rsUser.Field s('UNV1').Value ;
      Session('svUNV2 ') = MM_rsUser.Field s('UNV2').Value ;
      Session('svUNV3 ') = MM_rsUser.Field s('UNV3').Value ;
      Session('svUNV4 ') = MM_rsUser.Field s('UNV4').Value ;
      Session('svUNV5 ') = MM_rsUser.Field s('UNV5').Value ;
      Session('svUNV6 ') = MM_rsUser.Field s('UNV6').Value ;
      Session('svUNV7 ') = MM_rsUser.Field s('UNV7').Value ;
      Session('svICMS ') = MM_rsUser.Field s('ICMS').Value ;
      Session('svFocu s') = MM_rsUser.Field s('CFocus').Val ue;
      Session('svForm ation') = MM_rsUser.Field s('Formation'). Value;
      if (MM_fldUserAuth orization != "") {
      Session("MM_Use rAuthorization" ) = String(MM_rsUse r.Fields.Item(M M_fldUserAuthor ization).Value) ;
      } else {
      Session("MM_Use rAuthorization" ) = "";
      }
      if (String(Request .QueryString("a ccessdenied")) != "undefined" && true) {
      MM_redirectLogi nSuccess = Request.QuerySt ring("accessden ied");
      }
      MM_rsUser.Close ();
      Response.Redire ct(MM_redirectL oginSuccess);
      }
      MM_rsUser.Close ();
      Response.Redire ct(MM_redirectL oginFailed);
      }
      %>
      <script language=vbscri pt runat=server>
      ' *** Set A Session Variable
      ' *** MagicBeat Server Behavior - 2006 - by Jag S. Sidhu - www.magicbeat.com

      </script>

      The site is bieng hosted by godaddy and a valid dsn is in place under the name:
      access_customer s2.dsn

      Please help this is driving me nuts. It will serve to be a login and customer information update.

      Thanks
      Last edited by NeoPa; Dec 3 '06, 01:49 AM. Reason: Fix quote tags

      Comment

      • Cori
        New Member
        • Nov 2007
        • 1

        #4
        jegray did you ever find the solution? It's been years since I've used ASP and I usually used VBScript not Javascript. Any help that goDaddy has provided has been with examples of VBScript and they say it's a coding issue and won't help. bleh to them! :)

        I have pretty much the same problem where "Data source name not found and no default driver specified" is the error I get.

        My code looks similar to above, any thoughts from anyone on what is missing?

        Thanks, Cori

        Comment

        Working...