SQL Users? | xltronic messageboard
 
You are not logged in!

F.A.Q
Log in

Register
  
 
  
 
Now online (3)
Roger Wilco
DADONCK
recycle
...and 370 guests

Last 5 registered
Oplandisks
nothingstar
N_loop
yipe
foxtrotromeo

Browse members...
  
 
Members 8025
Messages 2614148
Today 20
Topics 127544
  
 
Messageboard index
SQL Users?
 

offline giginger from Milky Beans (United Kingdom) on 2004-10-20 03:12 [#01366749]
Points: 26326 Status: Lurker | Show recordbag



I'm trying to import a spreadsheet to a database. It works
fine on most sheets but on some I get this error:

Importing from Sheet:Ground Floor

Microsoft OLE DB Provider for SQL Server error '80040e14'

Unclosed quotation mark before the character string 'Smoke
detection conforming to BS 5837 Part 1 2002 should be
provided in the following locations: § Room 12 tea room §
Adjacent room 25 due to structural down stand in ceiling §
Room 8 store § In the Hospital Street as indicated on plan
within 1.5 metres o'.

/condition/appraisaltransfer.asp, line 324


Anyone able to suggest a possible reason and solution?

Thanks :D!



 

offline Drunken Mastah from OPPERKLASSESVIN!!! (Norway) on 2004-10-20 04:59 [#01366771]
Points: 35867 Status: Lurker | Show recordbag



add quotation marks where the message tells you to add
them...

I don't know, but that seems reasonable, since that's what
the message is saying...


 

offline horsefactory from 💠 (United Kingdom) on 2004-10-20 05:05 [#01366773]
Points: 14867 Status: Regular



That's what I thought too, but because it only happens with
certain spreadsheets, it might not be that. It sounds like
the spreadsheets that cause the error have a line too long
so it's cutting it off and somehow making that error with
the missing quotation mark occur.

Disclaimer: there is a good chance that I am painfully
wrong.


 

offline giginger from Milky Beans (United Kingdom) on 2004-10-20 05:17 [#01366777]
Points: 26326 Status: Lurker | Followup to Drunken Mastah: #01366771 | Show recordbag



Drunken Mastah: I thought that too.

Horsefactory: Sadly that's not the problem either. To test I
copied and pasted another cell, that imports correctly,
about 10-12 times inside itself so that it was significantly
longer than the one that didn't work.

UPDATE:

OK, have noticed some weird shit in the spreadsheet. The
cell that doesn't import won't format as text and when it
does it turns into ############## Even though it contains
data such as this:

Smoke detection conforming to BS 5837 Part 1 2002 should be
provided in the following locations:
§ Room 12 tea room
§ Adjacent room 25 due to structural down stand in ceiling
§ Room 8 store
§ In the Hospital Street as indicated on plan within 1.5
metres of the self closing automatic doors subdividing the
Hospital Street
§ Detector in room 36
§ Detector in lobby to room 35

Change it to number and it goes back to normal. Those
squiggle things aren't causing the error either as there's
other cells with the same squiggle and they import fine.
This is highly confusing. Best error in Excel I've ever seen
though :D!


 

offline xceque on 2004-10-20 08:44 [#01367012]
Points: 5888 Status: Moderator | Show recordbag



If you're using SQL to add a text/varchar etc field and the
text has a quote or apostrophe in it the SQL statement will
be evaluated as if the " or ' is the end of the string
you're inserting. So the best bet is to perform some sort of
transposition of quote and apos characters in the strings to
something more friendly before you build your SQL statement,
and then translate them back after.
If your string was XML I'd suggest replacing them with apos
and quot escapes ( & plus apos/quot plus ;)


 

offline epohs from )C: on 2004-10-20 08:48 [#01367016]
Points: 17620 Status: Lurker



yeah, maybe try to find and replace " and ' with "
and '.


 

offline giginger from Milky Beans (United Kingdom) on 2004-10-20 09:12 [#01367052]
Points: 26326 Status: Lurker | Show recordbag



There are no " or ' though. That's the weird shit.


 

offline epohs from )C: on 2004-10-20 09:15 [#01367059]
Points: 17620 Status: Lurker



wierd.

what's the datatype on the field/cell? i know when an
access database gets corrupted it'll replace the data with a
bunch of ######'s.... maybe you're just dealing with some
corrupt data.

try pasting the data from the spreadsheet into word, or
notepad, then from there into the database.


 

offline xceque on 2004-10-20 09:19 [#01367063]
Points: 5888 Status: Moderator | Show recordbag



What language are you using? What's your SQL statement
that's causing the error (complete with string data you're
inserting)?


 

offline JAroen from the pineal gland on 2004-10-20 09:21 [#01367065]
Points: 16065 Status: Regular



solution


 

offline giginger from Milky Beans (United Kingdom) on 2004-10-20 09:22 [#01367067]
Points: 26326 Status: Lurker | Followup to epohs: #01367059 | Show recordbag



Unfortunately that's been tried. Along with retyping the
text in, deleting the cell, deleting the row etc. I'm stuck
for an answer. Thanks for the ideas though people :)


 

offline giginger from Milky Beans (United Kingdom) on 2004-10-20 09:23 [#01367069]
Points: 26326 Status: Lurker | Followup to xceque: #01367063 | Show recordbag



I'll have to get back to you on that one as I didn't write
it.


 

offline epohs from )C: on 2004-10-20 09:32 [#01367081]
Points: 17620 Status: Lurker



it sounds like it's time for an exorcism.


 

offline giginger from Milky Beans (United Kingdom) on 2004-10-20 09:34 [#01367083]
Points: 26326 Status: Lurker | Followup to epohs: #01367081 | Show recordbag



http://www.fact-index.com/e/ex/exorcism.html


 

offline epohs from )C: on 2004-10-20 09:48 [#01367115]
Points: 17620 Status: Lurker



Kyung-A Ha was beaten to death in 1995 in San
Francisco, California by members of the Jesus-Amen
Ministries.


the jesus-amen ministries sounds aweslime.


 

offline thethirdball from Polly Pisspot (Canada) on 2004-10-20 09:55 [#01367129]
Points: 1629 Status: Lurker



Can you post the line(s) of code that are giving you
trouble?


 


Messageboard index