« Previous Next »

Thread: Need Some help Please: string connection with asp4free.com

Last post 04-24-2006 11:33 AM by insideout. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 04-18-2006, 11:02 PM

    • insideout
    • Not Ranked
    • Joined on 04-18-2006, 10:54 PM
    • Posts 0

    Need Some help Please: string connection with asp4free.com

    Hi there,
    Thank you for this great site, and a special thanks to all persons here who are giving a big help to newbees as me.
    here is my prob:
    I have set up some few ASP pages using dreamweaver 8 in wich I put some forms to collect data from users (actually I'm recruting subjects for a scientific research) and teste them on my local host using IIS server and access 2000 database. all things work correctly. My strconnection in my local machin is as follow:
    Code:
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO" 
    ' DesigntimeType="ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    
    MM_connsujets_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Inetpub\wwwroot\SujetsRec\db\RecruSujets  .mdb; Persist Security Info=False"
    %>

    I have found a site (http://www.asphost4free.com) wich host free asp pages. I uploaded my pages but the connection to the data base is no longer working. the host site give this sample of code to get to connect to the data base:
    Dim Conn
    Set Conn = Server.CreateObject("ADODB.Connection")
    strConnection = "DRIVER=Microsoft Access Driver(*.mdb);DBQ=" & Server.MapPath("/USERNAME/db/yourdatabase.mdb")
    oConn.Open(strConnection)
    ....
    ...
    oConn.Close
    I have follwed it and I have changed the username and the database name with mine but I can't figure out what to put to replace the .... after oConn.open. I git error this error when I have tryed to connect:
    I have replaced the oConn by Conn and I have this error:
     
    Microsoft VBScript runtime error '800a01a8'

    Object required: 'oConn'

    /kin2006/Connections/connsujets.asp, line 11

    when I remove the o I get this error

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

    /kin2006/Connections/connsujets.asp, line 11
    I deleted the oconn but it doesn't help I have tryed many other combination without any success.
    Any clue!!
    thanks in advance
  • 04-19-2006, 6:49 AM In reply to

    Re: Need Some help Please: string connection with asp4free.com

    Try changing this:

    MM_connsujets_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Inetpub\wwwroot\SujetsRec\db\RecruSujets.mdb; Persist Security Info=False"

    To this:

    MM_connsujets_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Server.MapPath("/USERNAME/db/RecruSujets.mdb"); Persist Security Info=False"

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 04-19-2006, 6:13 PM In reply to

    • insideout
    • Not Ranked
    • Joined on 04-18-2006, 10:54 PM
    • Posts 0

    Re: Need Some help Please: string connection with asp4free.com

    Thank you very much for your help but when I changed the string it gave me this error.

     Microsoft VBScript compilation error '800a0401'

    Expected end of statement

    /kin2006/Connections/connsujets.asp, line 9

    MM_connsujets_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Server.MapPath("/kin2006/db/RecruSujets.mdb");Persist Security Info=False"
    -----------------------------------------------------------------------------------------------------------------^
    Any Idea please.
    Thanks again

  • 04-20-2006, 6:28 AM In reply to

    Re: Need Some help Please: string connection with asp4free.com

    You're missing a double quote.  Close the quotes on the "Provider... section at .mdb")".

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 04-20-2006, 9:24 AM In reply to

    • insideout
    • Not Ranked
    • Joined on 04-18-2006, 10:54 PM
    • Posts 0

    Re: Need Some help Please: string connection with asp4free.com

    Thanks agai n Jeff and sorry for bothering you,

    I foloowed what you have asked me to do and here is the error message that i get:

    Microsoft VBScript compilation error '800a0401'

    Expected end of statement

    /kin2006/Connections/connsujets.asp, line 9

    MM_connsujets_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Server.MapPath("/kin2006/db/RecruSujets.mdb")";Persist Security Info=False"
    -----------------------------------------------------------------------------------------------------------------^

     I have tryed to put another double cote in front of provider and here the error that I get:

    Microsoft VBScript compilation error '800a0401'

    Expected end of statement

    /kin2006/Connections/connsujets.asp, line 9

    MM_connsujets_STRING = ""Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Server.MapPath("/kin2006/db/RecruSujets.mdb")";Persist Security Info=False"
    -------------------------^
     
    Thanks again for your big help. 

  • 04-20-2006, 2:12 PM In reply to

    Re: Need Some help Please: string connection with asp4free.com

    Sorry, you weren't missing one, you had one out of place.  Try:

    MM_connsujets_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Server.MapPath("/kin2006/db/RecruSujets.mdb");Persist Security Info=False"

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 04-22-2006, 9:09 PM In reply to

    • insideout
    • Not Ranked
    • Joined on 04-18-2006, 10:54 PM
    • Posts 0

    Re: Need Some help Please: string connection with asp4free.com

    Thanx Jeff for your answers your replys and your big help.

    Actually it didn't work. I guess it's better that I knock it off and try to host the site on my local machine.

    Thanks again and have a great day.

     

  • 04-23-2006, 10:13 PM In reply to

    Re: Need Some help Please: string connection with asp4free.com

    Didn't work as in you still got the end of statement expected error?

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 04-24-2006, 11:33 AM In reply to

    • insideout
    • Not Ranked
    • Joined on 04-18-2006, 10:54 PM
    • Posts 0

    Re: Need Some help Please: string connection with asp4free.com

    Yes that's wright.

    Do you want me to send you all the pages that I have done.  

    thx in advance

Page 1 of 1 (9 items)
Microsoft Communities