|
|
The language is not dictating this. Your use of the SQL driver is. If the other machine doesn't have the appropriate drivers updated to a minimum level, specifically the SQL Server driver, communication with the server will be problematic.
RageInTheMachine9532
|
|
|
|
|
a thousand thankyous i will give it a try and let you know
|
|
|
|
|
my mind has hit a flat spot how can i find out my version of mdac
|
|
|
|
|
There is no spot to go check for the MDAC version. But, you can go here[^] and pick up the Component Checker and it will ESTIMATE the version of MDAC your using. WARNING: This can take a while!
RageInTheMachine9532
|
|
|
|
|
you seem to know a fair bit, this is my first project as developer c# i use to be a trainer. i am building a windows app with and exe talking to a business dll to do all the processing so as i have a thin client i am not using remoting for the dll instead going down the route of a file share for the dll would like to know your thought if this is practical?
|
|
|
|
|
It's best to package the .DLL with the .EXE. If you keep the .DLL in a central location and, later, have to update the .DLL, you won't be able to because it is being kept open by however many copies of the software are running. You'll have an easier time updating application if it is installed completly local to the machine that is running it.
RageInTheMachine9532
|
|
|
|
|
I need to know how to invoke the execution of a OS command from a .NET (C#) application, more concretely the "net send" command.
A possible solution would be to create a batch file containing the command and a process to execute that file.
I would appreciate very much a more elegant solution from you!
--Miha
|
|
|
|
|
Try the following.
using System.Diagnostics;
string strCmdLine;
strCmdLine = "Net Send "+textBox1.Text + " " +textBox2.Text;
Process.Start("CMD.exe",strCmdLine);
process1.Close();
Help this works for you
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
Finally I implemented your solution, instead of using cmd.exe I used net.exe:
<br />
Process p = new Process();<br />
p.StartInfo.FileName = "net.exe";<br />
p.StartInfo.Arguments = " send " + strTo + " " + message + " ";<br />
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;<br />
Process.Start("net.exe",p.StartInfo.Arguments);<br />
p.Close();<br />
Thanks a lot!
--Miha
The truth will set you free!
|
|
|
|
|
I think you were after this:
using System;<br />
using System.Runtime.InteropServices;<br />
<br />
namespace MyNetSend<br />
public class MyNetSend<br />
{<br />
[DllImport("NETAPI32.dll", ExactSpelling = true, CharSet=CharSet.Unicode)]<br />
public static extern Int32 NetMessageBufferSend (string serverName, string msgName, string fromName, string buf, Int32 bufLen);<br />
<br />
public SendNetSendMsg ()<br />
{<br />
string message = "this is a test message";<br />
string userId = "auser";
NetMessageBufferSend (null, userId, null, message, message.Length * 2);<br />
}<br />
}
|
|
|
|
|
can someone please tell me how to convert a numericupdown value into a byte
OR an int into a byte
|
|
|
|
|
|
That could easily throw an OverflowException if your integer value was greater than 254. To convert any numeric type, use BitConverter.GetBytes instead, which will return an array of bytes if you expect values greater than 254.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I hope i don't get slammed to hard for this question but i can't seem to figure it out.
I understand you can use ///<summary> ///</summary> to do your comment pages
I also understand you can comment code with /* */ and //
So, how exactly do you add it to your function. For example.
If you have OleDbDataAdapter1.Fill(dataset); you can put the mouse over the Fill and it will say what it does like Fills dataset or whatever.
I noticed all the microsoft functions have this.
I would like to include this into my class i'm making so I could easily assist the user in using my class. I don't even know whats it is called i would assume a tooltip.
Thanks for the help.
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
You can try this:
1. Enter a path for the .xml documentation file in the project's properties
2. Copy that .xml with the .dll
I'm not sure if it works, but the .xml documentation contains all the summaries...
|
|
|
|
|
the xml file must also have the same name as the dll + ".xml"
eg:
mydll.dll
mydll.dll.xml
//Roger
|
|
|
|
|
Those styles of comments get compiled to an XML file which, as the others replies stated, needs to get deployed with your assembly in the same directory. That's what provides IntelliSense with member documentation.
For more on recommended tags and how to use them, see Documentation Comments[^]. Also, in your project configuration (right-click on the project, and select Properties) set the Documentation property to an XML file which matches your assembly name, like MyAssembly.xml if your assembly was MyAssembly.dll). This automatically builds the documentation XML file in the target directory (bin\Debug or bin\Release, by default depending on your build configuration).
You can also use these files to generate class documentation that can be easily viewed by developers, even integrated with the Visual Studio Common Collection which you see in VS.NET. See the NDoc[^] project - something I've helped develop a little - for a good (even Microsoft uses it for some projects) documentation generator that can produce HTML Help 1 and 2 and several other formats.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I have a database application i wrote to allow me to take notes on c# and enable me to look up the answers at a later time. If anyone is interested in this just shoot me an email and i'll happily send you the application. All i would ask in return is suggestions. In any event, in this application I use crystal reports to display my code snippets and so forth. This is where my question comes in. Once it generates the report for me it appears to be in read only which is perfectly fine however, is there a way to make it where i can copy and paste. This would be benificial to me instead of having to write the source code on line at a time. I know I could make a text box and overlay it so I basically select from the textbox and it appears to be from the report. To me that would be a crappy way of doing it. Any other ideas?
by the way if your interested in that program I mentioned send an email to
REMOVEME_bigt1@comcast.net
thats a one instead of a L
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
Reports and read-only for a reason - there's nothing to change. If you're looking for design capabilities at runtime, you need to license (costs mucho $$$) the designer components from Crystal Reports.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I have been trying to add data coming from UdpClient onto a datagrid by populating the data into a table and then add it to a DataSet. However, when I bind the data to the DataGrid using DataGrid.SetDataBinding(), I got an error that says "The controls on one thread can not be parented to another control on a different thread". I have searched everywhere for a solution to get around this but haven't found one that would work.
Right now I am using ListView instead but I still like to use DataGrid.
Any of your help is greatly appreciated!
Thanks
|
|
|
|
|
I think you need to use a delegate and an event handler from your UDP code to solve your problem. I don't know if your UDP client generates any events but if not you could always use a timer. You may be checking the UDPclient via a timer anyway.
updateTimer = new System.Timers.Timer();
updateTimer.Elapsed +=new ElapsedEventHandler(UDP_ready);
updateTimer.Interval = 1000;
updateTimer.Start();
and then
public void UDP_ready(Object source, ElapsedEventArgs e)
{
BeginInvoke(new UDPHandler(UDPReadyHandler));
}
public delegate void UDPHandler();
public void UDPReadyHandler()
{
}
There may be a more efficient way of acheiving this but it worked for me in a similar situation. I think you can use variables with the delegate if you need to.
|
|
|
|
|
Thanks again Chris for your suggestion.
I think your solution applies to asynchronous event but for network stream data keep coming in constantly all the time, this method would not work. I tried the test again using a delegate but it still is giving the same whining.
Here is the outline of my code:
DataTable myTable;
DataSet mySet;
FillTableHeaders();
mySet.Tables.Add(myTable);
Thread theadTest = new Thread(new ThreadStart(GetData));
threadTest.Start();
void GetData()
{ FillTableThruUDPConnection();
dataGrid1.SetDataBinding(mySet,"ParentTable");
}
I think there is another internal thread when the datagrid binds the data from a table that I can't seem to find a way or a method that go around the SetDataBinding method. ListView works really well for because it doesn't have have to have another medium to hold the data like the DataTable.
|
|
|
|
|
Hi,
I would like to create a monitor for a server running as an NT Service. The monitor will be visible in the notification area and a context menu will enable starting, stopping restrting (etc.) the server.
I have no idea where to start from . Can you please provide me some reference or general oerview? is it possible at all? I searched the net for IIS monitor, which I know exists but I'm not sure whether only in my organization (perhaps someone there wrote it). Anyway, I couldn't find anything useful.
I didn't write the server so I don't know if it exposes some API. Any reference will be a great kick start.
Thanks.
-------------------------------------------------------------------
* Only drug dealers and computer programmers call their clients 'users'...
* Pardon me for the poor English.
|
|
|
|
|
Extend ServiceBase and create your service if you haven't already. Add an Installer derivative that uses the ServiceInstaller and ServiceProcessInstaller (both optionally if you choose to have another installer do it) that installs it.
When you install the service, you must have it log in as a specific user that has an associated desktop as well as "Log in locally" rights, or install it to run under LocalSystem (SYSTEM) and enabled desktop integration.
Your monitor then can use the ServiceController to communicate with it on a basic level and receive notifications from the service, or you could use named pipes (no support in the .NET FCL), sockets, .NET Remoting (optimal between AppDomains), etc.
Search CodeProject. I'd bet there's a couple examples of something similar, otherwise I'm sure you'll find examples if you google[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|