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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-06-10 : 09:27:33
|
| Ryan writes "I am using a stored procedure and SQL mail to send a text file to another SQL server. The second server does an automated bulk insert from that file. The sending server was originally SQL 7 and receiving server was SQL 2000. Everything used to work perfect. I recently upgraded the sending server to SQL 2000 and now when I use xp_sendmail with an attachment, the attached file (no matter what it contains) is in a strange format. It opens in notepad and seems correct, but if I use wordpad or MS Word to open it...I see that there is an extra character between every valid character. If I use the conversion filters in MS Word and pick Unicode (Not Standard Unicode-8) then the file looks alright again. In any matter, bulk insert fails since it reads these extra characters as ASCII characters.However, when I tell my bulk insert on SQL that "Filetype='widechar'" it tells me that the file did not have a unicode signature and will be assumed to be char. How can I get around this? It worked great is SQL Server 7....Also, I even tested the select statement by setting it equal to "select 'Mike'" and then sending the file. It was still in the same unusual format. I tried all 4 file types available in bulk insert options." |
|
|
JamesH
Posting Yak Master
149 Posts |
Posted - 2002-06-10 : 12:15:40
|
| I don't mean to be a critc, but why are you using xp_sendmail to push data from one sql server to another one. If you're using a stored procedure why don't you just link the servers and insert the data directly? JamesH. |
 |
|
|
|
|
|