Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old March 9th, 2004, 08:53 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
  #2 (permalink)  
Old March 11th, 2004, 06:29 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Romania.
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

does the error appear inside the sp? if yes, on what line?

defiant.
  #3 (permalink)  
Old March 11th, 2004, 12:01 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
  #4 (permalink)  
Old March 11th, 2004, 03:25 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The line that seems to be giving me problems is:

EXEC @hr = sp_OACreate 'nti.CriminalData', @object OUT
  #5 (permalink)  
Old March 12th, 2004, 03:56 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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
  #6 (permalink)  
Old March 12th, 2004, 12:14 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #7 (permalink)  
Old March 12th, 2004, 12:24 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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
  #8 (permalink)  
Old March 12th, 2004, 01:05 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #9 (permalink)  
Old March 12th, 2004, 01:17 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well it may not even be present on the machine but it's worth a try.

--

Joe
  #10 (permalink)  
Old March 12th, 2004, 01:55 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, which file am I looking for?




Similar Threads
Thread Thread Starter Forum Replies Last Post
[ODBC] Driver's SqlSetConnectAttr Failed ruzlymoh BOOK: Beginning SQL 0 September 24th, 2008 08:50 AM
Call to Server.Execute failed while loading page i_shahid Classic ASP Basics 1 February 21st, 2008 04:48 PM
Generic List error ferahl C# 2 October 30th, 2007 03:28 AM
Generic error occured in GDI+ labby C# 0 December 19th, 2006 09:57 AM
Generic Error occured in GDI+ labby C# 2005 0 September 22nd, 2006 04:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.