Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP call to stored procedure - broke during upgrade from SQL 7.0 to 20

Status
Not open for further replies.

thbt

Programmer
Feb 23, 2004
1
CA
I have this stored procedure that takes a few parameters like date and merchant ID, and basically goes through a set of if-then statements to build a SQL SELECT string.

When we upgraded from SQL Server 7.0 to 2000, the stored procedure still worked from Query Analyzer, but not in BCP. It used to work in BCP just fine with 7.0. The error I get now is:

SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]BCP host-files must contain at least one column

What's really strange is, if I instruct the stored procedure to simply print the SELECT string, then cut-and-paste it into the end of stored procedure code (assigning it to the variable that already contains the SELECT string), then it works from BCP.

Any help would be greatly appreciated.

Aston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top