 |
|
 |
hi Rajesh Pillai
thank u for your project it's very help full to me
i'm a beginer, in a project i need a query optimizer , i mean a query analyzer that can optimize queries.
thank u indeed.
|
|
|
|
 |
|
 |
I have stopped the development of QASharp. The main reason being there are already good projects at codeproject like SqlBuddy, QueryCommander etc and I am already short of time for some serious development.
I have posted this message as even now I get questions regarding QASharp's further development...
Enjoy coding...
|
|
|
|
 |
|
 |
Will this be able to edit user defined functions in the future ?
|
|
|
|
 |
|
 |
I see several threads here promising an update to this code, but I do not see one!
|
|
|
|
 |
|
 |
Hi Andrew,
Sorry for the inconvenience. I have got a couple of queries regarding the update of QASharp.
I stay in Mumbai, India and am on an assignment in London for some time and would be here for another 3-4 weeks. Thats the reason I am not able to test the code and upload it to CodeProject.
Thanks for showing your interest in the project.
Regards,
Rajesh Pillai
Enjoy Life,
Rajesh Pillai
http://rajeshpillai.blogspot.com/
|
|
|
|
 |
|
 |
http://sqlbuddy.sourceforge.net/
|
|
|
|
 |
|
 |
Do you know something about 'Spliter' control?
|
|
|
|
 |
|
 |
Ya I do know.
But if you know something more about it, please do post it.
Or Check my next release when its available.
Most of your concerns and queries would be resolved.
Thanks,
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
1st: place vertical spliter on *main* form after "DBTree" to perform "DB-tree" and query form resizing, not on "query form"!
2-nd: place horizontal spliter between "query text" and "query results".
|
|
|
|
 |
|
 |
Hi,
Thanks for your reply.
Would definitely update the article.
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
Slowest DB app! Sorry but it's true...
One more thing! How about to test your application before release?
|
|
|
|
 |
|
 |
Hi,
Thanks for your honest comment and don't be sorry for ths. Ya I know its very slow. Thats why I posted a message titled "Next Release" saying that the entire thing is going to be refactored.
Cheers
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
In the next release there will be a lot of refactoring and functionality additions and code optimizations.
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
Nice job.
I tweaked your FindAndHighlight function to eliminate the try catch block. It seems to me that the Richedit control has a bug in that the Find function ignores the start value. Anyway, here is a workaround, this eliminates the exception errors which should make it run faster.
private void FindAndHighlight(string SearchText, Color HighlightColor, bool MatchCase, bool WholeWords, int startPos)
{
int FoundAt;
int SearchLength;
int CurrentSelectionStart = rtbQueryPad.SelectionStart;
int CurrentSelectionLength = rtbQueryPad.SelectionLength;
RichTextBoxFinds RTBfinds;
if (SearchText == string.Empty) return;
if (MatchCase && WholeWords)
RTBfinds = RichTextBoxFinds.MatchCase | RichTextBoxFinds.WholeWord;
else if (MatchCase)
RTBfinds = RichTextBoxFinds.MatchCase;
else if (WholeWords)
RTBfinds = RichTextBoxFinds.WholeWord;
else
RTBfinds = RichTextBoxFinds.None;
SearchLength = SearchText.Length;
DBControls.FlickerFreeRichEditTextBox._Paint = false;
int nStartPos = startPos;
int nPrevPos = -1;
do
{
FoundAt = rtbQueryPad.Find(SearchText, nStartPos, RTBfinds);
if (FoundAt > -1)
{
// work around bug in richedit control
if (nPrevPos != FoundAt)
{
rtbQueryPad.SelectionColor = HighlightColor;
nPrevPos = FoundAt;
nStartPos += SearchLength;
}
else
{
FoundAt
}
}
} while (FoundAt > -1);
rtbQueryPad.SelectionStart = CurrentSelectionStart;
rtbQueryPad.SelectionLength = 0;
rtbQueryPad.SelectionColor = Color.Black;
DBControls.FlickerFreeRichEditTextBox._Paint = true;
}
You may want to run this program with the debug setting turned on that stops on exceptions, as I noticed a couple other exceptions occuring elsewhere in the startup code.
Tom McAnnally
|
|
|
|
 |
|
 |
Hi,
Thanks for the observation and code snippet. In the next release i am planning a major change in the program structure. This snippet would be definitely be helpful to me.
Thanks
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
I see you are doing syntax highlighting with Microsoft's RichTextBox. Do you find that to be slow when working with large[r] amounts of text, say, 10-100 KB? I've implemented a fairly complete Transact-SQL coloring routine and it is so slow -- it'll take over a minute to color a 100 KB file. I'm guessing that the text in an RTB is stored in large chunks or one large chunk, so that altering it requires the whole piece of text or at least large portions of the text to be stored in reallocated memory.
In other words, I hate the RTB and am looking for a better text box for coloring text -- perhaps I will make my own.
Comments?
|
|
|
|
 |
|
 |
I haven't tested it with large chunks of data. But I dont find it slow. Will look into it. I am not able to avoid the flickering when syntax highlighting. Working on it.
Would post here if I find something useful.
Best Regards,
Enjoy Coding
Rajesh Pillai
|
|
|
|
 |
|
|
 |
|
 |
Thanks.
I have seen this site.
Also I am able to subclass the RichTextBox to avoid flicker-free highlighting. Would soon post the code.
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
Looks great so far. The flickering has already been mentioned, so I won't go there.
The two things I have been searching for in a query tool, but have been too lazy to write my own:
1. Text "Macros" to enter just a few letters and have it fill in the rest, somewhat like a user-defined intellisense.
2. Vertical typing and editing, like UltraEdit. Because you are using a fixed-width font, this could be done in a grid fairly easily. This is for when you have multiple statements to type or edit.
Thanks, and good job!
Cheers,
Daaron
|
|
|
|
 |
|
 |
Thanks for the suggestions.
In fact I was planning to add intellisense, but not the way you mentioned.
Can you please elaborate on text "Macros" you mentioned?
I will check UltraEdit too.
Regards
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
The "macro" I am thinking of are things I type constantly, but things specific to us. For instance, we are constantly doing the same joins and the same user defined functions for many ad-hoc queries. It would be great to type something like "attbill" and have the text macro fill in "from cdr_attempt a left outer join cdr_billing b on a.recordid=b.recordid."
It would save tons of keystrokes.
Cheers,
Daaron
|
|
|
|
 |
|
 |
Got the point. Will keep in mind your suggestions over the next releases.
Thanks
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |
|
 |
Hi,
this isn't (V)C++ nor is it a button control! I have a sneaking suspicion that says: "You're in the wrong area man!"
best regards
Thomas
|
|
|
|
 |
|
 |
Changed the area.
Thanks
Enjoy Coding,
Rajesh Pillai
|
|
|
|
 |