|
wheelerbarry wrote: Windows firewall is turned off and there is no other firewall in-between the boxes.
Has the server been configured to use a different port?
Can you get Enterprise Manager/ SQL Management studio / Query Analyzer to connect?
|
|
|
|
|
Can you connect with VS. If so you could verify the connection strings via vs.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
Connecting to SQL Server 2005 (and Express) has one slight difference in how you point to the sql server.
In previous versions you would say the server's ip or name when requested (i.e. localhost or (local))
but it 2005, you need to put the server and the sqlserver (i.e. localhost/sqlserver)
In Sql Server 2005 Express, point to it using ".\sqlexpress"
Although i didn't quite understand what you are trying to do, or how, i hope this helped.
Ericos Georgiades
|
|
|
|
|
Hi folks!
I just came across a nasty problem I don't have a solution for.
When you have a selection in a textbox/richtextbox you can only query the start and length of the selection (SelectionStart , SelectionLength ). SelectionStart is always the left margin of the selection and SelectionLength is always >= 0.
Unfortunately, that way it's impossible to tell in which direction the selection has been created: Left to right or right to left.
In most cases this is not a problem but I want to adjust the selection exactly the way it can be done using Shift+Cursor Left/Right. With this combination you can always move the end of the selection around, even when the end of the selection is left of the selection start.
I've even tried using EM_GETSEL to retrieve the start and end of the selection, but - just as SelectionLength is always >= 0 - the selection start is always <= the selection end
Does anyone have an idea how to get to this extra information?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
You have this functionality by default on the textbox...
I don't see why you need to be able to set SelectionStart and Length from both directions. If you're doing a Shift+Left on a KeyDown event handler why not just do:
textBox1.SelectionStart--;
textBox1.SelectionLength++;
|
|
|
|
|
I need to adjust the selection as a reaction to button presses on special input devices (a footswitch or a hand-held microphone).
With Shift+Cursor, the textbox remembers the direction of the selection even after you release the Shift key, but when you look at the properties of the textbox you always get the same information, regardless of whether you selected the right margin and used Shift+Left or if you selected the left margin and used Shift+Right. So what am I supposed to do when the corresponding button is pressed: Decrement SelectionStart or decrement SelectionLength ?
Perhaps I could send the corresponding keys to the TextBox (I want to select words, so Shift+Ctrl+Left/Right could work), but that seems like a hack to me and I'd rather avoid it...
And what if I want to select sentences, not only characters or words?
Hmmm.....
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I see what you mean... perhaps hold an internal variable that remembers if the selection was right-to-left or left-to-right (a bool would do). Then do an if/else on it.
Left selected:
if (rightToLeft)
{
textBox1.SelectionStart--;
textBox1.SelectionLength++;
}
else
{
textBox1.SelectionLength--;
}
Right selected
if (rightToLeft)
{
textBox1.SelectionStart++;
textBox1.SelectionLength--;
}
else
{
textBox1.SelectionLength++;
}
|
|
|
|
|
Thanks for the suggestion, but my control is only one of several possibilities to set the selection and I still don't know how to initialize rightToLeft .
For the moment I went for the "send Shift+Ctrl+Left/Right" solution (that's working at least), but still I'd be interested if someone found out a better way...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Have you tried going backwards?
Messages.SelectionStart = Messages.Text.Length;
Messages.ScrollToCaret();
|
|
|
|
|
I'm not sure if I understand what you mean.
ScrollToCaret() moves the visible part of the textbox but I need to adjust the selection...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
If you create a <[yourAppName].exe.config> file like the one below,
you will see extra "socket" debug tracing information.
However when I try to do this programmatically (below),
I don't see any trace info.
<<<
TraceSource ts = new TraceSource("System.Net.Sockets", SourceLevels.Verbose);
ConsoleTraceListener consoleListener = new ConsoleTraceListener();
consoleListener.Name = "console";
ts.Listeners.Add(consoleListener);
>>>
The question is why?
Can it be done programmatically?
Here's the config file that works...
<configuration>
<system.diagnostics>
<sources>
<source name="System.Net.Sockets" switchValue="Verbose">
<listeners>
<add name="console" type="System.Diagnostics.ConsoleTraceListener"> </add>
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration>
|
|
|
|
|
I received this from Microsoft.
To configure you the listeners and level of logging for a listener you need a reference to the listener that is going to be doing the tracing. Your call to create a new TraceSource object creates a trace source with the same name as the one used by the System.Net.Sockets classes, but it's not the same trace source object, so any changes do not have an effect on the actual TraceSource object that System.Net.Sockets is using.
Because of this, you'll need to use the application configuration file to enable the trace.
The tracing config settings lets you listen to messages from a trace source (in this case from Socket classes) but the TraceSource instance itself remains private and inaccessible directly/programmatically. Think of it this way – you don’t want to grant direct access to your trace source instance and let someone send messages under disguise but you do want to allow operations to configure what level of information you trace and where you trace etc…
|
|
|
|
|
Hello all,
I am trying to call a javascript function from a Link Button.
<asp:LinkButton OnClick = "javascript:popupwin(VrNo=<%#DataBinder.Eval(Container.DataItem,"IDD")%>,1,frmClient.HiddenClientId.value)" ID="lnkViewDetails" runat="server">View Details</asp:LinkButton>
But i am getting a follwing error while switching to design view "The server tag is not well formed"
Where is the problem ??
Please help ...
|
|
|
|
|
use the LinkButton onClientClick
|
|
|
|
|
Thanks for your reply but still there is same error.
"The server tag is not well formed."
|
|
|
|
|
have you got runat=server in your tag?
Have you got a closiing tag?
Paste the tag here and I'll have a look at it for you
|
|
|
|
|
<asp:LinkButton OnClick = "javascript:popupwin(VrNo=<%#DataBinder.Eval(Container.DataItem,"IDD")%>,1,frmClient.HiddenClientId.value)" ID="lnkViewDetails" runat="server">View Details</asp:LinkButton>
This is my tag for Link Button..
|
|
|
|
|
Heya,
I'm having problems creating a custom group control (which I'll call XPanel for now). I'd like XPanel to be a user control consisting of several sub-panels, that the XPanel user can add their own child controls to.
I have two problems with this:
1) If I add an event handler to the XPanel.ControlAdded event that transfers the added control to one of the sub-panels, I get an error in a message box at design time: "'child' is not a child control of this parent". This doesn't happen if I create and add the control at run-time.
2) How do I allow the sub-panels to be selectable at design time? Will I have to write my own design-time painting and interaction code? At the moment, the XPanel appears as a big indivisible unit when I add it to a form.
Thanks in advance!
Andy
|
|
|
|
|
I've just tried and I can add sub-controls to 'XPanel' in the VS-designer without issue if I inherit XPanel from Panel instead of UserControl . No ControlAdded event handling required.
|
|
|
|
|
Hi Bob,
Thanks! I think I wasn't clear about it, though - I have no problem inheriting XPanel from Panel and adding child controls, but that's not quite what I want.
XPanel has N child panels S1..SN, that could look like this:
<br />
+-XPanel------------+<br />
|...................|<br />
|.+-S1--+...........|<br />
|.|.....|...........|<br />
|.+-----+..+-S2--+..|<br />
|..........|.....|..|<br />
|..........+-----+..|<br />
|...................|<br />
+-------------------+<br />
If the user of XPanel adds an instance to a form, I would like her to be able to add controls to XPanel.S1 or XPanel.S2, instead of to XPanel directly.
Which is why I wanted to handle ControlAdded, so I could pass controls added to XPanel on to XPanel.S1 or XPanel.S2.
Thanks again,
Andy
-- modified at 10:35 Monday 29th January, 2007 (got inheritance order wrong
|
|
|
|
|
Hi,
is there a wax to tell the compiler to ignore a warning for a region of code, like it is possible in C++ like this:
#pragma warning( disable : 4705 )<br />
...
#pragma warning( default : 4705 )
Thanks for Help
Greets
Roland
|
|
|
|
|
See this article on MSDN
#pragma warning disable 4705
and
#pragma warning restore 4705
Gruß
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank,
but it looks like it is a feature added in .net 2.0. is there a way to do the same in .net 1.1 as i am stuck to it for this project...
Greets
Roland
|
|
|
|
|
What is the warning that you are trying to ignore?
---
Year happy = new Year(2007);
|
|
|
|
|
The Warning CS0067: The event 'event' is never used.
It is caused by a class dummy created for a test that implements an interface that contains this events. As some events are not relevant for the test they are not used.
I can live with it but it would be nicer to have a 'clean' build.
Greets
Roland
|
|
|
|