 |
| SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 9th, 2004, 08:53 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Generic ODBC Call Failed error
Hi,
I'm trying to import a number of fixed width text files in to a sql server database using a stored procedure, but I keep getting a generic message that says "ODBC Call Failed" without giving me any details. The other thing is that this import used to work. Until we restored our domain controller after it went down. Any ideas?
Thanks,
Ethan
|
|

March 11th, 2004, 06:29 AM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
does the error appear inside the sp? if yes, on what line?
defiant.
|
|

March 11th, 2004, 12:01 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm not sure. Is there a way to tell? The logs show that it seems to run ok until it gets to the stored procedure.
|
|

March 11th, 2004, 03:25 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The line that seems to be giving me problems is:
EXEC @hr = sp_OACreate 'nti.CriminalData', @object OUT
|
|

March 12th, 2004, 03:56 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Seems a strange error message for that call. Is the progid correct and is the component installed on the server in question? Does the user connecting have rights to create the COM class?
--
Joe
|
|

March 12th, 2004, 12:14 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The account has administrator privilages so that shouldn't be a problem, as far as the system goes. With in SQL Server itself I've given the account every permission I can find to give it, but I may have missed something. I'm pretty new to SQL server and I inherited this system so I sure I don't know the ins and outs. Is there a way to check the progid and component installation?
This the error it gives me on the query analyzer when it gets to that line if it helps:
Server: Msg 50000, Level 16, State 1, Procedure sp_ImportWADoc, Line 31
[Microsoft][ODBC SQL Server][SQL Server]NetScreen Error, Source: ODSOLE Extended Procedure Description: Invalid Class String
|
|

March 12th, 2004, 12:24 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
If you have access to the server try this short script, save it to a file and double click. Then try the second version from your machine (if it's not the same one). This will simulate what the sp_OACreate does.
Code:
//Simple COM test, save as ProgIdTest.js on actual server and run from server
try
{
var oObject = new ActiveXObject("nti.CriminalData");
}
catch(e)
{
WScript.echo(e.message);
}
oObject = null;
Code:
//Simple COM test, save as ProgIdTest.js on your machine and run from there
try
{
var oObject = new ActiveXObject("nti.CriminalData", "<server name goes here"); //Server name, not SQL server name. They maybe different
}
catch(e)
{
WScript.echo(e.message);
}
oObject = null;
If you get 'Cannot create object' or the like the control is not registered on the server.
--
Joe
|
|

March 12th, 2004, 01:05 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the response I did get a message saying "Automation server can't create object". Do I need to use regsvr32.exe?
Thanks again,
Ethan
|
|

March 12th, 2004, 01:17 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Well it may not even be present on the machine but it's worth a try.
--
Joe
|
|

March 12th, 2004, 01:55 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ok, which file am I looking for?
|
|
 |