I have a custom application that is a dual Oracle/SqlServer tool. There is only a single window (.Net 2.0 Windows Form) which contains, among other things, two RichTextBox controls, one for Oracle and one for SqlServer. Are there any choices on the Advanced tab of Target Options that would allow me to differentiate these two RichTextBoxes so I could use SqlAssist in each?

Thu Apr 19, 2007 1:07 pm

SysOpSite Admin

Joined: 26 Nov 2006Posts: 6739

I don't think this is possible to differentiate - both controls have the same windows class name and sit in the same application with the same name and window caption. You can dynamically change the environment in SQL Assistant options while working with the application, but you got to do it every time you switch to a different edit control.

Thu Apr 19, 2007 1:35 pm

msorens

Joined: 29 Jan 2007Posts: 12Country: us

One more piece of information that may allow this ( you tell me :-)
I was not quite accurate when I said both are RichTextBox controls. Each of them are custom user controls. One is an OracleRichTextBox, which subclasses my AbstractRichTextBoxPlus, which subclasses RichTextBox. The other is a SqlServerRichTextBox, which again subclasses AbstractRichTextBoxPlus and then RichTextBox. So they should be differentiable at some level. Unfortunately when I check your Target Window Class property they both seem to be showing "WindowsForms10.RichEdit20W.app.0.378734a". Any way I could influence that...?

Thu Apr 19, 2007 1:48 pm

SysOpSite Admin

Joined: 26 Nov 2006Posts: 6739

I don't know. I will have to check with developers.

Are you by any chance interested in integrating SQL Assistant with your program using more reliable methods such as SQL Assisatnt API?

Thu Apr 19, 2007 3:32 pm

msorens

Joined: 29 Jan 2007Posts: 12Country: us

One other thought occurred to me--I can change the Windows Firm title depending on which RichTextBox is active. I notice your options includes a TargetTitle property. Would SqlAssistant be able to recognize the title change and switch to a different configuration?

If not, then I guess I am interested in learning more about the API.

Thu Apr 19, 2007 4:19 pm

SysOpSite Admin

Joined: 26 Nov 2006Posts: 6739

The title is only used once when SQL Assistant decides to bind to the new process or process window. Dynamic changes after the initialization step are too late to change anything