Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Visual Studio Express SQL Textbox Formatting

Posted on 2014-01-21
2
Medium Priority
?
933 Views
Last Modified: 2014-01-30
Hi,

I am creating an application in Visual Studio Express (VB). One of the fields is a non editable text box which will contain some SQL.

How can I format the textbox so that the SQL dedicated words / comments etc are properly formatted?

Thanks

Mike
0
Comment
Question by:ubya308
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 32

Expert Comment

by:Robberbaron (robr)
ID: 39799267
how do you define 'properly formatted' ?

do you mean you want the SQL reserved words capitalised, if not in quotes ?
0
 
LVL 32

Accepted Solution

by:
Robberbaron (robr) earned 2000 total points
ID: 39799285
some lists for reference...
http://technet.microsoft.com/en-us/library/ms189822.aspx
https://drupal.org/node/141051

then parse the text looking for these words, but need to check for quotes

or do you want different functions to be on separate lines as well...


but a better option would be to send it to on of the online formatters like http://sqlformat.org/api/   the VB.NET calls would be similar to the ruby example.

http://architectshack.com/PoorMansTSqlFormatter.ashx has a library you  could use.

(note i have not tried any of the api or libraries)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question