Asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stressed out
    New Member
    • May 2007
    • 1

    Asp

    Will desiging a website in dreamweaver on an apple mac laptop affect your ASP code? Here is an example of the code used to add entry to a database:

    <td height="350">&n bsp;</td>
    <td valign="top"><F ORM ACTION="addentr y.asp"><font face="arial" color="white">
    <p align="center" class="style19"
    <%
    Dim rs, conn
    set conn = Server.CreateOb ject("ADODB.con nection")
    set rs = Server.CreateOb ject("ADODB.Rec ordset")
    conn.Provider = "Microsoft.Jet. OLEDB.4.0"
    conn.Open(Serve r.Mappath("quer y.mdb"))

    aid=request("ne w_First_Name")
    aln=request("ne w_Last_Name")
    afn=request("ne w_Email")
    an=request("new _Query")
    sqlstr="insert into mailingstats values('"& aid &"','"& aln &"','"& afn &"','"& an &"')"
    rs.Open sqlstr,conn

    Response.Write( "Thank You. " & aid & " your query has been recorded, Feile an Phobail will get back to you as soon as possible.")
    set rs = Nothing
    %>

    is this correct???
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Welcome to the scripts. It looks good to me except that you didn't declare your variables aid, aln, etc.

    I always use rs.addNew rather than insert, but that's mostly a personality thing. I find it works well and is easier to troubleshoot.

    I don't use dreamweaver, but I do use a mac, and have never had problems with my asp code. The biggest potential problem there is that the new line symbol for a mac and a pc are different, but I still haven't seen a problem from this.

    Let me know if this helps.

    Jared

    Comment

    Working...