Visual Studio .Net/VS.net >> Strange problem working on C# Windows Forms app at work and at hom

by SmVycnlS » Sun, 08 Jan 2006 20:53:01 GMT

I started an app at work (VS 2005 + SQL Server 2005). I added a UserControl
and use it in 6 forms. At home I have the same setup. Connection string is
set to localhost so data access works in both places with no problems.

When I leave work, I copy the whole folder and db files to USB key. I can
build and run at home, but I cannot open any form with the user control on
it. I get error:

An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)

I assume somewhere deep down the name of my machine at work is in a
connection string, but I can't find it. Even rebuilding doesn't solve the
problem.

Any ideas?


Visual Studio .Net/VS.net >> RE: Strange problem working on C# Windows Forms app at work and at hom

by V2lsbGlhbSBCdWNoYW5hbg » Mon, 09 Jan 2006 18:37:03 GMT


Hi Jerry
Are you using the same version of SQL server at home? I have this problem at
home having just installed SQL Server Express. I didn't come accross the
problem at work when I installed the full version of SQL Server.
Will






Similar Threads

1. C DLL not work in Windows Service but works fine from Console app - CSharp/C#

2. Looking for good windows forms sample in C# showing how to work with ListBox

Hello,

This seems like it should be easy...

I have a listbox on a .NET form.

I add a new item to the list box.

How can I associated a separate data value?

Can I add (and retrieve) an arbitrary data value independent of the text
displayed?

I also tried creating an object and providing a ToString override.  That did
let me add the item but I still didn't see a way to lookup based on
enumerating the list...

Thanks,
-- 
Grant Schenck


3. Windows Form App Within Another Windows Form App - CSharp/C#

4. ActiveX .NET Drag&Drop control work fine in windows form not in web Form

I have create an activex Control with Visual studio 2005 and framework
2.0 in c# to add drag & drop functionality to upload multi file.
 When I use it in a windows form it work fine. Infact if I select 3
files from a windows explorer and I move it in a listbox in my
activeX, I find my 3 files added in the listbox but if I use my
activeX in a web form and  I select 3 file from a windows explorer in
the listBox find only 1 file the file on which the mouse is on when
the drag & drop operation begin.

I post some code..

 private void listBox1_DragDrop(object sender, DragEventArgs e)
       {
                Array a = (Array)e.Data.GetData(DataFormats.FileDrop);

               if (a != null)
               {
                  // if i execute the activeX in a windows Form the
a.Length property value is the exact number of file that i have
selected
                 //  if i execute the activeX in a web Form the
a.Length property value is always 1                    for (int i =0 ;
i< a.Length; i++)
                   {                                         string s
= a.GetValue(i).ToString();

                       if (!listBox1.Items.Contains(s))
                           {
                               string filename =
System.IO.Path.GetFileName(s);
                               listBox1.Items.Add(filename);
                                             }
                   }
               }
   }


 Anyone knows why in web Form The value of a.Length is Always 1?

Thanks wery much

5. Problem with termination of a console app within an MFC app while console is working

6. OutputDebugString not working in VC2005 (was "not working in plain C++ app")

Ok, I have a little more information.  (The app I'm using to test with is 
just a plain, App-Wizard created app.)
*  If I run the app w/o the debugger then I can see the OutputDebugString 
statements in DebugView.
*  If I run the app w/o the debugger and then attach to the process using 
VC6.0 I can see the OutputDebugString output, too.
*  If I run the app w/o the debugger and then attach to the process using VS 
2005 I can NOT see the OutputDebugString output.

So, clearly the OutputDebugString calls are working but for some reason VS 
2005 is not showing them properly.

Microsoft Visual Studio 2005 Version 8.0.50727.42  (RTM.050727-4200)

With this new information, does anyone have any hints or suggestions?
Thanks!
Chris


"Chris" < XXXX@XXXXX.COM > wrote in message 
news:f8Hjg.24398$ XXXX@XXXXX.COM ...
> I'm using VS 2005 and am fairly new to it.  I knew VS6.0 like the back of 
> my hand....
> I've created a Win32 console app using the App wizard w/ default values to 
> work with some code I was previously working with in 6.0.  However, none 
> my OutputDebugString statements (and thus my TRACEs) are printing to the 
> Output window.  I can't find any docs that say why or why not.  Any hints 
> or things to check?  I'm really banging my head against this....
>
> Below is a sample run from my app SDKBase.exe.  If it were running under 
> 6.0 it would be littered with TRACE statements.  What's so different (or 
> turned off by default) in VS2005 so as to make my TRACEs not appear?
>
> Any help would be *really* appreciated.
> Chris
>
>
> 'SDKBase.exe': Loaded 
> 'D:\projects\covipc\Support\SDKBase\debug\SDKBase.exe', Symbols loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Exports loaded.
> 'SDKBase.exe': Loaded 
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugMFC_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_c8452471\mfc80d.dll', 
> Symbols loaded.
> 'SDKBase.exe': Loaded 
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', 
> Symbols loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', Exports loaded.
> 'SDKBase.exe': Loaded 'C:\Program Files\Google\Google Desktop 
> Search\GoogleDesktopNetwork3.dll', Exports loaded.
> 'SDKBase.exe': Unloaded 'C:\Program Files\Google\Google Desktop 
> Search\GoogleDesktopNetwork3.dll'
> 'SDKBase.exe': Loaded 'C:\WINDOWS\system32\wmfhotfix.dll', Exports loaded.
> 'SDKBase.exe': Loaded 
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.MFCLOC_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_3415f6d0\mfc80ENU.dll', 
> Binary was not built with debug information.
> The program '[39368] SDKBase.exe: Native' has exited with code 0 (0x0).
>
> 


7. Need help for COM working from .NET Web app, but not working from .NET EXE app - ASP.NET Web Controls

8. UDP socket works fine on NT, doesn't work on Windows 2000 outside VS 6.0 IDE

We have an old client-server MFC application that uses UDP socket
connection between client and server. In a nutshell, the client opens
a connection, and the server starts sending small heartbeats every
second.

Everything works fine on Win95/98/NT4.0 SP6 and on Windows 2000 SP3
inside VS 6.0 IDE in the debug mode. On Windows 2000 either inside IDE
(release mode) or outside VS 6.0 IDE (both debug and release build),
client only receives a few first heartbeats, nothing thereafter. And
the socket remains open.

Is anyone familiar with this behaviour? Any suggestions? Any help will
be greatly appreciated.

Thanks in advance,

-- Jake