SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    this is a new one. "Data source name too long"

    here is the error:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    [Microsoft][ODBC Driver Manager] Data source name too long
    /lors/idl/custom.asp, line 88


    referring to this line:

    objRs.Open "EXEC uspIDLCustomItems '" & intRefNum & "', '" & strItemName & "'", objConn


    i'm passing in 2 parameters to a stored procedure. the connection works everywhere else but here. never seen this one before. any ideas?

  2. #2
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Fairly obvious one, but have you made sure that what you are passing to the SP isn't too bit for the field that you are modifying?

    Might just be blank spaces on either end of the string, do you trim all your variables?
    .NET Code Monkey

  3. #3
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm should have read the error better.

    Can you show us your connection string?
    Last edited by big_al; Aug 21, 2002 at 16:54.
    .NET Code Monkey

  4. #4
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm away from my computer now, will try to get it up here as it's in my global.asa. the really strange thing is i use this in exactly the same on the page prior with no problems.

  5. #5
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm that is strange.

    I looking for the error on MSDN, that wasn't much help.

    I'll keep looking for you.
    .NET Code Monkey

  6. #6
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually, i did have it:

    Application("dbname") = "DSN=xxx;User Id=xxx;PASSWORD=xxx;"
    Application("dbname_CommandTimeout") = 30
    Application("dbname_CursorLocation") = 3
    Application("dbname_RuntimeUserName") = "xxx"
    Application("dbname_RuntimePassword") = "xxx"

  7. #7
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by big_al
    Hmm that is strange.

    I looking for the error on MSDN, that wasn't much help.

    I'll keep looking for you.
    yeah, i spent a while poking around as well and never came up with anything. thanks!

  8. #8
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    made some changes

    changed to this and got a little further actually.
    Code:
    SQL = "EXECUTE uspIDLCustomItems '" & intRefNum & "', '" & strItemName & "'"
    Set objRS = objConn.Execute(SQL)
    intItemNum = objRs("quantity")
    now it tells me that "either BOF or EOF has been reached" or something like that. getting closer.

  9. #9
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,251
    Mentioned
    113 Post(s)
    Tagged
    1 Thread(s)

    Re: made some changes

    Originally posted by bbolte
    changed to this and got a little further actually.
    Code:
    SQL = "EXECUTE uspIDLCustomItems '" & intRefNum & "', '" & strItemName & "'"
    Set objRS = objConn.Execute(SQL)
    intItemNum = objRs("quantity")
    now it tells me that "either BOF or EOF has been reached" or something like that. getting closer.
    OK. That means the query returned no values. Are you sure the stored proc is running correctly and that those parameters will return the value?
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  10. #10
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it is. and i think i've figured out why that error is happening as well, just haven't had time to go back and recode. but, i'm still confused on the very first error and what my change did to correct it.

  11. #11
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by bbolte
    yes it is. and i think i've figured out why that error is happening as well, just haven't had time to go back and recode. but, i'm still confused on the very first error and what my change did to correct it.
    Only guessing here but I'd say that for some reason having the line:
    objRs.Open "EXEC uspIDLCustomItems '" & intRefNum & "', '" & strItemName & "'", objConn

    Where obbjConn being used in an .open statement the object being passed accross was somehow confusing the compiler.

    Just a guess, but strange things like do often poke their ugly heads out of the works every now and then

    Let us know how you get along.
    .NET Code Monkey


Bookmarks

Posting Permissions

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