Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 bulk insert can not be work in java

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-08 : 07:48:38
repekcan writes "Hi,
I try to use "BULK INSERT" command in java via store procedure.But i am getting an error message from sql server site.

the message is :
code page 857 can not be suport by the operation system.

my sample code is :

String query = "{ call sp_addData(?,?,?);}";
File temp = new File("C:\\sqlFolder\\a.txt");
CallableStatement cs = conn.getConnectionObj().prepareCall(query);
String path = temp.getPath();
cs.setString(1,"digitalPva_deneme_DigitalTag1");
cs.setString(2,temp.getPath());
cs.setLong(3,100);
cs.execute();
cs.close();

The sp_addData a store procedure where bulk insert method run.

Sincerely,"

saglamtimur
Yak Posting Veteran

91 Posts

Posted - 2005-03-08 : 08:07:02
Have you try to add CODEPAGE argument? CODEPAGE=857. Look BOL for BULK INSERT and how to add CODEPAGE. Or try to convert your char/varchar datatyped columns to ncahr/nvarchar.
Go to Top of Page
   

- Advertisement -