Windows Develop Bookmark and Share   
 index > Windows Forms General > Simple SQL Question - Issue with brackets in INSERT String
 

Simple SQL Question - Issue with brackets in INSERT String

==========================================================

IDE: VS2005 Pro

Technologies: MS ACCESS, VB.NET

==========================================================

Is there a restriction against using brackets in an SQL query?

Such as inserting a text string:

INSERT INTO SB_ACTIONS (ACTION_PLAN, ACTION_CODE,UID) VALUES('(To extend fabrication by 5 [providing proper instruction])', 325, 4567685)

I understand that some LIKE queries use the brackets in place of percent signs or astericks. Is this causing the issue?

Is there a way around this, such as using double-single-quotes ( '' ) to prevent SQL injection, so that I may allow users to enter a string that includes brackets?

Your help is greatly appreciated,

KJAK

kjak  Monday, April 23, 2007 2:59 PM

Okay. I have spoken to a few database administrators. They couldn't think of any reason why this wouldn't work.

I went through and repeatedly debugged this issue. I finally noticed that it was an extra apostrophe that was being tacked onto the SQL statement. A stupid mistake. I found where that was being added and corrected it. I don't expect there to be any more issues with this.

Thanks for all who looked and tried to help!

KJAK

kjak  Monday, April 23, 2007 7:03 PM

Okay. I have spoken to a few database administrators. They couldn't think of any reason why this wouldn't work.

I went through and repeatedly debugged this issue. I finally noticed that it was an extra apostrophe that was being tacked onto the SQL statement. A stupid mistake. I found where that was being added and corrected it. I don't expect there to be any more issues with this.

Thanks for all who looked and tried to help!

KJAK

kjak  Monday, April 23, 2007 7:03 PM

You can use google to search for other answers

Custom Search

More Threads

• HELP PLEASE
• Validation Of Controls
• Ideas Appreciated
• Communication between windows services and windows applications
• webservices call from backgroundworker fails...
• ContextMenuStrip.ItemClicked event not being triggered when showing more than 1 ContextMenuStrip at once
• Problem with screen capture api
• app icon not shoing up in taskbar or launch bar
• Developer Express Grid control
• Pop Up Window