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.

Problem in ASP

Discussion in 'C#' started by razareal, Oct 27, 2007.

  1. #1
    Actually i have got a problem while submitting form through asp into access database check the error blow:

    Error:

    Microsoft JET Database Engine error '80004005'

    Not a valid file name.

    /admin/login.asp, line 26


    As far as path is concern its perfect but still problem at the same position, Does anyone know how can i fix this problem.:confused:
     
    razareal, Oct 27, 2007 IP
  2. grobar

    grobar Well-Known Member

    Messages:
    642
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    140
    #2
    post admin/login.asp's code dude. i'll have a look
     
    grobar, Oct 30, 2007 IP
  3. DPGBB

    DPGBB Peon

    Messages:
    96
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are you sure that your connection string is pointing correctly to your MS Access database?
     
    DPGBB, Oct 30, 2007 IP
  4. razareal

    razareal Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Actually i am calling cn.asp file in login.asp file and here is the code of cn.asp file:

    <%
    dim Conn
    Conn = "Provider=Microsoft.JET.OLEDB.4.0; Data Source = /admin/db.mdb"
    %>

    Please guide me how can i fixed this problem!
     
    razareal, Oct 31, 2007 IP
  5. DPGBB

    DPGBB Peon

    Messages:
    96
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What's your URL?
     
    DPGBB, Oct 31, 2007 IP
  6. teraeon

    teraeon Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Couple of things...

    First make sure that your mdb is in a directory that can't be red in IIS, for security purposes. Either put it outside of your web directory, or put it in a directory and go into IIS and disable reading.

    But as far as your error, it's your connection string. Put in the full file path in there C:\....\admin\db.mdb

    Conn = "Provider=Microsoft.JET.OLEDB.4.0; Data Source = C:\inetpub\....admin\db.mdb"
     
    teraeon, Oct 31, 2007 IP
  7. razareal

    razareal Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Actually, i am testing on live domain, here is the path: "http://mojizahfoods.com/admin/login.asp" and my database is in admin folder but still im getting error.
     
    razareal, Nov 1, 2007 IP
  8. razareal

    razareal Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    here is the URL: "http://mojizahfoods.com/admin/login.asp" and my database is in admin folder but still im getting error.
     
    razareal, Nov 1, 2007 IP
  9. razareal

    razareal Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    yes, i am 100% sure that my access database is pointing correctly with ms access database.
     
    razareal, Nov 1, 2007 IP
  10. DPGBB

    DPGBB Peon

    Messages:
    96
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    DPGBB, Nov 1, 2007 IP
  11. teraeon

    teraeon Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Try putting the full path in your connection string, even if it's in the same directory.
     
    teraeon, Nov 1, 2007 IP
  12. Link.ezer.com

    Link.ezer.com Peon

    Messages:
    647
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #12
    if DB in the /admin/ same folder then you may use
    Data Source = /db.mdb
    or
    Data Source = db.mdb

    else in a different folder then you may try
    Data Source = ../otherfolder/db.mdb

    :)
     
    Link.ezer.com, Nov 5, 2007 IP
  13. amwyyytg

    amwyyytg Well-Known Member

    Messages:
    391
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #13
    Is the problem solved?
     
    amwyyytg, Nov 10, 2007 IP
  14. razareal

    razareal Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    No, Still not.
    Waiting that some one will help me in this digital discussion forum.:rolleyes:
     
    razareal, Nov 11, 2007 IP
  15. wacamoi

    wacamoi Peon

    Messages:
    810
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #15

    <%
    Conn = "Provider=Microsoft.JET.OLEDB.4.0; Data Source ="& pathChangeAnyTime & "db.mdb"
    %>


    Did you really move your access database file to the place it shall be?

    :D
     
    wacamoi, Nov 11, 2007 IP
  16. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Try using the absolute path instead of the relative path. I had similar problem and changing to absolute path worked for me.

    Regards,
    UrStop
     
    urstop, Nov 13, 2007 IP
  17. razareal

    razareal Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    could you guide me how can i make absolute path?:confused:
     
    razareal, Nov 13, 2007 IP
  18. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #18
    absolute path will be somethig like c:\foldername\foldername\msaccesss.mdb

    You can do a response.write with the mappath method of ASP to get the absolute path and then use it in the connection string.
     
    urstop, Nov 13, 2007 IP
  19. rena

    rena Peon

    Messages:
    1,987
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #19
    You have to use Server.Mappath ie physical path for accessing DB not virtual path. Are u using that??
     
    rena, Nov 16, 2007 IP
  20. orielo

    orielo Peon

    Messages:
    175
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #20
    as it seems, this problem has been solved...
    checked the url,
    can login with admin/admin...
    even due you cant add a user since the db seems to be read only.
    gl then.
     
    orielo, Nov 19, 2007 IP