Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help--"Quoted String not Properly Terminated"?--Solved!

Help--"Quoted String not Properly Terminated"?--Solved!

From: Kate Woodman <kate.woodman_at_nau.edu>
Date: Mon, 15 Nov 1999 12:20:46 -0700
Message-ID: <38305D0E.5459B163@nau.edu>


Thanks for your input Kenneth...but I figured out what the problem was.

Turns out that one of my fields--.m_sTechnician--was having the problem. I filled that field using the Win32 API call GetUserName, which requires a buffer of a specific size. I had been trimming off the extra spaces leftover from that call, but it seems that GetUserName tacks on a null character to indicate the end of the string (it's a C++ call). That particular null character didn't show up when I dumped the data into a text file, so I couldn't tell that there was anything wrong with that field.

But, when I turned on the ODBC tracing facility (go to Control Panel, ODBC, Trace, select "Start tracing now") and waded my way through the 1MB file that was generated, the particular Insert statement that ODBC was barfing on was shown as being truncated half-way through--right where that particular null character was!

So, by trimming an extra character off my input into that field, I was able to get rid of the C++-generated null character, and solve the problem.

I knew it was going to be a whack-your-head-why-did-I-forget-THAT kind of problem.

Kate Received on Mon Nov 15 1999 - 13:20:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US