Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Visual Studio Express SQL Textbox Formatting

Posted on 2014-01-21
2
Medium Priority
?
937 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

885 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