VoiceGuide IVR Software Main Page
Jump to content

How To Avoid Single Quotes In Db Inserts?

Recommended Posts

Can you tell me how to avoid a problem where a DB insert returns a customer name that has a single quote in it? For example, John O'Brien.

 

My situation is as follows:

 

1. DB Module returns the customer name.

2. Later on, I want to insert the customer name into another table with VG Script.

 

I am trying to do this with a VBSscript but not successful.

Share this post


Link to post

This is more of a general programming/database related question then a VoiceGuide related one.

 

Most commonly you would need to change any single quotes to two single quotes before inserting data in database, but depends on what database you are using.

 

Here is one web based article that covers this: http://www.windowsitpro.com/article/john-savills-windows-faqs/how-do-i-insert-a-single-quote-into-a-microsoft-sql-server-database-.aspx

Share this post


Link to post

Yes, I have done this many times during programming. The question was how can I do it with VG's scripting engine and then pass value to another DB module? No worries, I already figured it out and used the evaluation expresssion module to do a replace and then set the value in that module so it could be referenced by $RV variable later.

 

Thanks.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×