Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 7:30 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Revisit topic of getting quotemarks into a DB -- SQL write
PostPosted: February 14th, 2009, 10:25 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I have lost my way. I am now seemingly playing the old "Stomp-the-mole" boardwalk game. When I fix the script to work one way, some other aspect is broken.

Specifically trying to write a section of paragraph text to the SQLite DB. The scripts I am using pass fine when paragraph has no quotemarks at all. When I write the code one way, I get errors for single-quote apostrophes which are in the paragraph. Write code the other way, and errors for standard quotemarks --- ".

Code:
//use Full quotes " for the SQL statement, single quotes around values to be set
"UPDATE tablePROD SET " +pgvarFieldName + " = +'"+pgvarTextParagraph+"' , etc WHERE etc  " 

//use single quotes ' to demarcate the SQL statement, and double-quotes encapsulate values returned from Opus variables.
'UPDATE tablePROD SET ' +pgvarFieldName + ' = +"'+pgvarTextParagraph+'" , etc WHERE etc ' 


What's weird is I thought I had conquered this obstacle before. Is there a solid reference guide for this somewhere?

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: February 14th, 2009, 9:50 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I'm having a 'brain thaw' now. I do remember that I did do some string processing to detect single-quotes and put in two chars in sequence, O'hara becomes O''hara. (thanks to an earlier post).

I guess I was just playing with discrete amounts of data then, and went on to some other things. Now it seems I've got to build that into a standard procedure.

WYSIWYGTSFTGWYW
what you see is what you''ve got to script for to get what you want. :roll:

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group