A Beginners ASP & MS Access Database Connection Pr

Results 1 to 2 of 2

Thread: A Beginners ASP & MS Access Database Connection Pr

  1. #1
    Join Date
    Dec 1969

    Default A Beginners ASP & MS Access Database Connection Pr

    I&#039;m new to ASP but old to sql and want to connect to my access database on my local machine via asp. However, I can&#039;t seem to find simplified detailed instructions that don&#039;t assume I&#039;m some ASP guru. Thus, I&#039;ve been banging my head against error after error.<BR><BR>So far this is what I&#039;ve got (naturally, it doesn&#039;t work!):<BR><BR>&#060;% <BR> Dim Conn<BR> Dim objRS<BR> Dim SQLstring<BR> Set Conn = Server.CreateObject("ADODB.Connection")<BR> Set objRS = Server.CreateObject("ADODB.Recordset")<BR> Set SQLstring = "SELECT Title, FirstName, LastName, EmailAddress, Profession from members WHERE EmailAddress = &#039;cjunze@hotmail.com&#039;; "<BR> Conn.Mode = adModeRead<BR> Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("/fpdb/fegocook.mdb")&_";DRIVER={MS Access (*.mdb)}" <BR> Conn.Open "fegocook" <BR> objRS.open SQLstring, Conn<BR>%&#062;<BR><BR>I know it&#039;s c**p but, I&#039;m going to have to keep the date b/w my head and the brick wall without DETAILED, CHILD-LIKE, STEP BY STEP EXAMPLES & EXPLANATIONS AS WELL AS A SAMPLE CODE THAT ACTUALLY WORKS!!!<BR><BR>Thanks!!

  2. #2
    Join Date
    Dec 1969

    Default You have *two* drivers specified...

    ...so you are confusing the poor driver system.<BR><BR>Specify *either* JET *or* Access, but not both.<BR><BR>Look here:<BR>http://www.able-consulting.com/ADO_Conn.htm<BR><BR>Best bet is this:<BR>http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet<B R><BR>So in your code, just wipe out everything from the &_ characters onward.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts