-
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!
-
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 ?
-
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.
-
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.