![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
From OpenRowSet('Microsoft.Jet.OLEDÂ*B.4.0', 'Excel 8.0;Database=C:\test.xls;HDR=YÂ*ES;IMEX=1', ['Sheet1$']) |
#2
| |||
| |||
|
|
I have an Excel spreadsheet that I'm trying to import into a SQL Server 2000 database. I'm using OpenRowSet to import the data and it works great unless there is data in an Excel cell that exceeds 255 characters. When a cell contains > 255 characters, I get the following error (when run from Query Analyser): [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionChe*ckForData (CheckforData()). Server: Msg 11, Level 16, State 1, Line 0 General network error. Check your network documentation. Connection Broken Here's the SQL that I'm trying to run. In the example below, I have a field called "Company Notes". When it exceeds 255 characters, the error occurs. create table #foo (t text) insert into #foo (t) Select [company notes] From OpenRowSet('Microsoft.Jet.OLED*B.4.0', 'Excel 8.0;Database=C:\test.xls;HDR=Y*ES;IMEX=1', ['Sheet1$']) I have been tried to modifing the regestry entry HKEY_LOCAL_MACHINE\SOFTWARE\Mi**crosoft\Jet\4.0\En gines\Excel*\*TypeGuessRows and set this from 8 to 0 and HKEY_LOCAL_MACHINE\SOFTWARE\Mi**crosoft\Jet\4.0\En gines\Excel*\*ImportMixedTypes is set to Text How can I import data > 255 characters in length? Thank you in advance for the help! |
![]() |
| Thread Tools | |
| Display Modes | |
| |