473,387 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Incorrect host-column number found in BCP format-file

Hi guys, would appreciate if you can shed some light on this.

Sorry to be a pain, can you tell me what is wrong with the following:

for /F %%i in ('dir /b /on c:\bcp\pc*.txt') do bcp Inventory..pc in
%%i -fc:\bcp\bcp.fmt -T -S CHICKYy
where CHICKYy is the server

bcp.fmt

8.00.194
6
1 SQLCHAR 0 20 ", " 0 filler_1 ""
2 SQLCHAR 0 8 "\r\n" 1 computer_name ""
3 SQLCHAR 0 20 ", " 0 filler_2 ""
4 SQLCHAR 0 16 "\r\n" 2 ip_address ""
5 SQLCHAR 0 20 ", " 0 filler_3 ""
6 SQLCHAR 0 60 "\r\n" 3 operating_system ""

pc1.txt and other *.txt format is:

JW_193801,
192.168.1.1,
Windows XP,

when I run it I get:
C:\bcp>for /F %i in ('dir /b /on c:\bcp\pc*.txt') do bcp Inventory..pc in
%i -fc:\bcp\bcp.fmt -T -S CHICKYy

C:\bcp>bcp Inventory..pc in pc1.txt -fc:\bcp\bcp.fmt -T -S CHICKYy
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number
found in BCP format-file

C:\bcp>bcp Inventory..pc in pc2.txt -fc:\bcp\bcp.fmt -T -S CHICKYy
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number
found in BCP format-file

C:\bcp>bcp Inventory..pc in pc3.txt -fc:\bcp\bcp.fmt -T -S CHICKYy
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number
found in BCP format-file

C:\bcp>bcp Inventory..pc in pc4.txt -fc:\bcp\bcp.fmt -T -S CHICKYy
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number
found in BCP format-file

C:\bcp>bcp Inventory..pc in pc5.txt -fc:\bcp\bcp.fmt -T -S CHICKYy
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number
found in BCP format-file

The sql table has 3 columns:

Sorry to be a pain.

--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com

Jul 20 '05 #1
1 14289
Michelle Hillard (mh******@craized.tv) writes:
bcp.fmt

8.00.194
6
1 SQLCHAR 0 20 ", " 0 filler_1 ""
2 SQLCHAR 0 8 "\r\n" 1 computer_name ""
3 SQLCHAR 0 20 ", " 0 filler_2 ""
4 SQLCHAR 0 16 "\r\n" 2 ip_address ""
5 SQLCHAR 0 20 ", " 0 filler_3 ""
6 SQLCHAR 0 60 "\r\n" 3 operating_system ""
...
C:\bcp>for /F %i in ('dir /b /on c:\bcp\pc*.txt') do bcp Inventory..pc in
%i -fc:\bcp\bcp.fmt -T -S CHICKYy

C:\bcp>bcp Inventory..pc in pc1.txt -fc:\bcp\bcp.fmt -T -S CHICKYy
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Incorrect host-column number
found in BCP format-file


BCP's is not famous for its self-explanatory messages.

My guess goes to the version number. It should say 8.0, not 8.00.194.

(And if you are running 8.00.194 somewhere, you should download and
install SP3 for SQL Server to get a couple of important bug and
security fixes.)

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James | last post by:
Hi, I am making a basic DVD shop and after having produced code which displays a list of DVDs from my database, I implemented a search facility which enables the user to search by title, director...
5
by: Kevin Haryett | last post by:
My host is running WIMP and has set up shared configuration. Lets say the address is http://kevin.host.com Now, the actual directory is c:\inetpub\wwwroot\kevin If I check PHP_SELF from a...
14
by: Carl Gilbert | last post by:
Hi I am currently writing a site that utilises tables. I have one page that links to a second page. The only problem is that when I link to the second page, the table loads up with a...
3
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements -...
1
by: murphy | last post by:
Hi, I've been seeing two symptoms with my asp.net site that have started recently after a long period of smooth running. As others on our team make changes to referenced dll's I find that I get...
2
by: David | last post by:
Is there any known defects with respect to Databinding to a ComboBox that is located on a UserForm? I have a scenario on one of my forms that I have spent HOURS trying to solve that has...
4
by: Peter Ritchie | last post by:
Does anyone know how to suppress a specific warning for a line or block of code in C#? C++ has a nice facility to disable a warning for a block of code with #pragma for warnings that are incorrect...
0
by: rajpatel50 | last post by:
Hi all, I’m seeing some strange behaviour when using an Unmanaged OLEDB Microsoft driver (v5.0.0.919 as supplied with Host Integration Server) to access DB2 on an iSeries (V5R3) via C# code ...
8
by: The KwikOne | last post by:
Since to have a page validate (HTML and XHTML) you should have your URL parameters separated by the appropriate separator. However, if an ampersand is used it needs to be expressed as & (example:...
5
by: Krice | last post by:
There is a component class inside the host class: class Host { Component *c; .... In some cases Component needs to call the host and I guess the only way is that you pass the host for it:
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.