Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply With Quote
  #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.
Reply With Quote
  #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.
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:06 PM.


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