Results 1 to 4 of 4

Thread: ODBC Error! Please Help!!!!

  1. #1

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Arrow

    Hello everybody,

    I'm having problem with my COM object. I have created a DLL in VB that is accessing SQL database.
    I have a global variable that holds connection string.

    when i use that component from withing another VB application it works perfectly, but when used from ASP page it fails. Component gets created OK but it gives me this error:

    Code:
    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    Please help, i tried passing a connection string from ASP page to my component, but still get the same error!


    What should I do!
    www.HardFind.com -buy/sell/trade your used hardware.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    These sort of errors are tricky to diagnose at the best of times! Without seing your code it'd virtually impossible!!!

    post your ASP code and if possible the component code as well.

    Have you got the parameters in the DLL declared byVal or byRef ?

    Mark
    -------------------

  3. #3
    Member
    Join Date
    Jun 2000
    Posts
    37
    Is the ASP running from the same computer as the other VB programs are? Since you have to set up each database you want to be able to use for ODBC on a computer, it may be that the ODBC connection you're looking for doesn't exist on the computer running the ASP, or maybe has a different name.

    At least this is my first guess by looking at the error text.

  4. #4

    Thread Starter
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Got another one!

    I kinda fixed previous one but now i got some other error:

    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'TimeSheet'


    my query is as follows:

    SQLstring = "SELECT Timesheet_Id FROM TimeSheet WHERE Employee_ID = '" & employeeId & "' AND tsh_Date >= '" & startDate & "' ORDER BY tsh_Date;"

    and i'm 100% positive that there is a table called TimeSheet.

    And this is my Connection String:

    connString = "Driver={SQL Server};Server=COMPUTER-213;DSN=TimeTracking;uid=sa;pwd=;"

    TimeTracking - is a DSN Name on computer COMPUTER-213


    Please help.
    www.HardFind.com -buy/sell/trade your used hardware.

Posting Permissions

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



Click Here to Expand Forum to Full Width