1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Error in the login

Discussion in 'C#' started by GatZ, Jul 6, 2006.

  1. #1
    i've download this script:
    http://optusnet.dl.sourceforge.net/sourceforge/aspprocatalog/aspProductCatalogv1.0.zip

    It's a very simple catalog script using asp and acces but i dont understand why it doesn't work.

    The error is during the login with username and password, there's something wrong in the connection to the path of the database.

    .Database is in the folder aspProductCatalog\database\aspProductCatalog.mdb
    .The path to the database is in the folder aspProductCatalog\admin\cn.asp

    this is cn.asp
    <%
    	' Connection Strings
    	dim Conn
    	' Add full path of database with filename here
    	cnProvider = "Provider=Microsoft.JET.OLEDB.4.0;"
    	cnDataSource = "Data Source =link_to_database.mdb"
    	Conn = cnProvider & cnDataSource
    
    %>
    Code (markup):
    Can someone help me to get this script working ?
     
    GatZ, Jul 6, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you will need to replace "link_to_database.mdb" with the physical path to the database, i.e. e:\yourwebsite.com\aspProductCatalog\database\aspProductCatalog.mdb or whatever your physical path is.

    you can find your physical path by inserting the code below into your asp page:

    <%
    Response.write Server.MapPath(Request.ServerVariables("Path_Info"))
    %>
     
    vectorgraphx, Jul 6, 2006 IP
  3. GatZ

    GatZ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You are a genius :) really tnx tnx tnx now it works!!! i just did like you said. My physical path was wrong ;)
     
    GatZ, Jul 6, 2006 IP
  4. GatZ

    GatZ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    now i've got a little bug in the script (or maybe i'm too noob again :) )

    when i log in and add a product the image i've selected is not upload correctly.

    The script tells me that all it's ok , and in the catalog product's page the path of the photo is updated correctly, but in the ftp folder this image has not been uploaded...:confused:
     
    GatZ, Jul 6, 2006 IP
  5. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #5
    check your directory permissions - the directory you are trying to upload to needs to have the iuser_web user granted write access in order to upload files. you may need to get with your host to do this.

    your script may be telling you it's ok even if it didn't work if "on error resume next" is stated.

    VG
     
    vectorgraphx, Jul 6, 2006 IP
  6. jcollett

    jcollett Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Has anyone managed to customise this script?

    I also downloaded it and it's really neat, but I wish to add some extra fields to manage for the Products table.

    I am familiar with VBScript/ASP coding but I have clearly missed something here.

    I have added a new field to the table - that is the simple bit. I have then edited the file frmProduct.asp to add the corresponding form field and treatment for this new field.

    The new field (Author) shows up on the form but it won't save it even though I have added the code to do this, as far as I can tell.

    The "hard bit" is the Uploader class that is used. I am not sure how this works; it looks generic but perhaps tere is something specific in here that needs to be amended to allow extra fields to be handled.

    Any clues, anyone?
     
    jcollett, Dec 3, 2006 IP
  7. jcollett

    jcollett Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    All sorted. This script customises real good. I made a dumb error adding the extra field in the form. So let me give a thumbs up for this app.
     
    jcollett, Dec 3, 2006 IP