2,245 Posted Topics
Re: You need to specify "-S servername" to tell osql where to connect. [code=dos] C:\Documents and Settings\scott>osql -Sapex2006sql -Usa -Ppassword 1> [/code] | |
Re: I'm sure this is not what he is asking but you could be a smartie and answer with 'object' :P [QUOTE] Object Class Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all classes in the … | |
Re: I experienced the same problem when I was writing my data layer --- [code=csharp] try { /* * If an ENUM fails to parse it will default to the first value. * I hope whatever enum this is has an UNKNOWN defined in the first ordinal position :) */ fp.FI.SetValue(this, … | |
Re: Please take a few extra seconds to type out a complete question when posting. Do you mean "select" the cell so the contents are highlighted or change the background color? To change the color: [code=csharp] this.dataGridView1.Columns[1].DefaultCellStyle.BackColor = Color.Red; [/code] | |
Re: You will want to follow serkan's advice and make the user download the .NET framework and not include it with your installer. When you get the .NET framework from a Windows Update it will download only the files you need. If you want a standalone installer it has to include … | |
Re: What mask do you have defined in your masked text box? You should be able to parse the string and assemble your DateTime in a worst-case scenario. It sounds like this is a weird mask... | |
Re: The login success/failure is determined by the Video Server so if you want to record successful logins then the video server would need to have a logging mechanism. You could log all connections to the video camera by enabling "Log TCP SYN Packets" on the router, if that option is … | |
Re: You could try calling [icode]Environment.FailFast("test");[/icode] Also you should use asynchronous operations for the ping so you can terminate your thread immediately. Here is the example from MSDN: [code=csharp] using System; using System.Text; using System.Net; using System.Net.NetworkInformation; using System.ComponentModel; using System.Threading; namespace Examples.System.Net.NetworkInformation.PingTest { public class PingExample { public static void … | |
Re: I think Murtan is right. Why don't you take a look in to "remoting" in C#. It basically allows you to call methods running on another computer. IE you have a 'server' application running on a remote machine and you can call methods and pass values. In this case you … | |
Re: [code=vb.net] Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim bigNumber As Decimal = 1234567.123456 Console.WriteLine("F2: " & bigNumber.ToString("F2")) Console.WriteLine("N2: " & bigNumber.ToString("N2")) 'Likewise: TextBox1.Text = bigNumber.ToString("F2") End Sub [/code] Results in: [code] F2: 1234567.12 N2: 1,234,567.12 [/code] So use F2 to not include a thousands … | |
Re: avirag, The operations on your tool strip don't exactly make sense for your application. What text will "cut, copy, paste" alter? What are you wanting to print? What file format do you want to save in? How do you want the printed control to display on the canvas? You have … | |
Re: You have two sets of sizes for a picture --- the physical size of the image (if you were to print it and not grow/shrink/stretch the image) and the pixel size. [code=vb.net] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim fName As String = "C:\picture.bmp" … | |
Re: You can't. Whatever you are trying to do you are going about it the wrong way. This is more to do with security policies than programming. | |
Re: This question is a duplicate of another poster. Are you and 666kennedy in the same class? :) [code=csharp] using System; using System.Collections.Generic; namespace daniweb { class MultiArray { private static string[] GetTestData() { List<string> result = new List<string>(); result.Add("return1.MV TE244654.MV b43tgwg.sp"); result.Add("01.62 00.83 100.76"); result.Add("01.62 00.83 100.77"); result.Add("01.60 00.83 100.78"); … | |
Re: Are you trying to write a mailserver from the ground up to listen on port 25 and accept inbound mail messages from remote MTAs, or are you wanting to use a POP3/IMAP/Exchange connection to download your email from your mailserver? | |
Re: To catch very low level exceptions you need to capture stdout and stderr: [code=dos] AppName.exe > debug.txt 2>&1 [/code] Review debug.txt after the execution fails | |
Re: You cannot assign [icode]null[/icode] values like that to the grid but what you can do is use [icode]DBNull.Value[/icode]. Here is a snippet where I am populating a grid and I check for nulls. If it is null then I use a DBNull in the grid: [code=csharp] dtRow[i1] = (gridRow.Cells[i1].Value == … | |
Re: You want a tool called the "SQL Server Profiler" which catches query and transaction information. It is a available as a "Performance Tool" for the full installations of SQL. | |
Re: Try quoting the input to curl: [code=bash] curl --silent POST "${url}" < rss.txt [/code] That is the only thing I see different | |
Re: You have a lot of dates with files -- created, modified, and accessed. [code=csharp] private void button4_Click(object sender, EventArgs e) { FileInfo fi = new FileInfo(@"C:\picture.bmp"); Console.WriteLine(fi.LastAccessTime); Console.WriteLine(fi.LastWriteTime); Console.WriteLine(fi.CreationTime); if (fi.CreationTime.Date.Equals(DateTime.Today.Date)) //file was created today { //do stuff } } [/code] To iterate a directory use this approach: [code=csharp] private … | |
Re: Do you want to do this with Excel automation (Interop) or with OleDb? | |
Re: You use a combination of Docking and Anchors. Look at [icode]Control.Dock[/icode] and [icode]Control.Anchor[/icode] (on any button or panel). If you anchor something then it will grow with the form. Docking changes how the growth behaves. You will want to use panels, groupboxes, or any other container object throughout your form. | |
Re: [code=csharp] public void WatchLogonEvent(object stateObject) { AutoResetEvent stopWatcher = stateObject as AutoResetEvent; WqlEventQuery q = new WqlEventQuery(); q.EventClassName = "__InstanceCreationEvent"; q.WithinInterval = new TimeSpan(0, 0, 3); q.Condition = @"TargetInstance ISA 'Win32_NtLogEvent' and TargetInstance.LogFile='Security' and TargetInstance.EventIdentifier=528"; try { using(ManagementEventWatcher watcher = new ManagementEventWatcher(q)) { watcher.EventArrived += new EventArrivedEventHandler(LogonEventArrived); watcher.Start(); // wait … | |
Re: Your MAC address is associated with your physical network card and not the operating system so you should have an identical MAC Address for both windows and Linux. Do you have two NICs? Is this a wired connection or wireless? | |
Re: Run a windows update manually and install all of the required updates. On the left pane you should see another section called "Optional" or something similar -- select that. Install [b]all[/b] .NET related software packages from windows update. After that do a reboot and you should be good to go. … | |
Re: Typically you deal with bytes, not bits. If you read a 16 bit number and [b]display[/b] it then you will be deplaying it as text so that doesn't matter unless you're talking about converting it to a 10 bit number, then displaying it as text (you cant always go from … | |
Re: Use this instead of the random number class in the .NET framework: [code=csharp] public static int GetRandom(int Maxvalue) { byte[] randomNumber = new byte[1]; System.Security.Cryptography.RNGCryptoServiceProvider Gen = new System.Security.Cryptography.RNGCryptoServiceProvider(); Gen.GetBytes(randomNumber); int rand = Convert.ToInt32(randomNumber[0]); return rand % Maxvalue + 1; } [/code] Note in there that i'm only filling a … | |
Re: Upload your project with the .CSV file inside of the zip. That is a lot of code to debug without it :) | |
Re: The .xsc file belongs to your DataSet and not the individual DataSource, i.e. you can have 1 DataSet but 30 DataSources that reference the single typed DataSet. You're fighting a losing battle with the IDE generated DataSets. I don't use them for this reason :) | |
Re: [code=vb.net] dataGridView1.Rows(dataGridView1.SelectedCells(0).RowIndex).Cells(0).Value [/code] You could also use the .SelectedRows property instead of .SelectedCells depending on how you have the row selection set up in the grid. | |
Re: You need to provide more information of sample file names/data that you're wanting to parse. Its hard to work backwards from that code :) Include more information and we'll see what we can do! | |
Re: It sounds like you're connecting to the wrong database on the server or you're using a different schema. Try to do "exec dbo.sproc" on your laptop as you're probably an admin on your desktop and thus it was created under the dbo schema. If you're already calling the sproc with … | |
Re: Welcome to daniweb guiman! Write a class to deserialze the xml, or create an xsd and using xml parsing... there are a hundred ways to go about it. You can load the data in to a [icode]DataTable[/icode] and not necessarily the database so you can look at the data before … | |
Re: Here is what i came up with.. it should get you started [code=csharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmFunnyTextBox : Form { volatile bool mouseDown; public frmFunnyTextBox() { InitializeComponent(); mouseDown = default(bool); } … | |
Re: Are you sorting it inside the listview or is it databound and are you sorting it when you bring the data forward? | |
Re: Please use code tags when posting queries on daniweb: [noparse] [code=sql] ...query here... [/code] [/noparse] Next --- I cannot tell what you are trying to do since you have abstracted away the table and column names. You can access the same column twice for multiple calculations so you do not … | |
Re: What database are you using? You can also use Excel automation to extract the data but I would use the OleDb approach outlined above. | |
Re: Use DTS or right click on your database and click "Import" in SQL Server Management Studio. I don't know if these options are available for the express/free version. If that is the case then you need to recreate the tables in MSSQL by hand and write insert queries to move … | |
Re: 1) You can install it anywhere you want to 2) You can install them side-by-side but the tools are installed in a common location so you can only have one version of them. The SQL2008 tools are backward compatible so you want to install their version of the tools and … | |
Re: I would follow the advice Ramesh gave but you can also access a #Temporary table created before calling the sproc. That does limit how and where you can call your sproc from though and is probably not a good idea: [code=sql] IF OBJECT_ID('sp_Test123') IS NOT NULL DROP PROCEDURE sp_Test123 GO … | |
Re: You can follow an online example at: [url]http://www.codeguru.com/csharp/csharp/cs_webservices/tutorials/article.php/c5477[/url] | |
Re: This grid is entirely set up in code. You can add a combo box to a gridview as shown below: [code=csharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace daniweb { public partial class frmGridView3 : Form { private … | |
Re: You should not copy executables directly. What you need to do is create an installer for your assembly (project). You can do this by going to "File -- New Project" then select "Add to existing project". Use a Setup or Setup Wizard project. I think it is under the "Setup … | |
Re: Download wireshark (requires winpcap also, it will install it for you) and SIW [url]http://www.gtopala.com/siw-download.html[/url]. Use wireshark to sniff your traffic and visually look at the traffic and see which local port is eating up all of your bandwidth. You can then use SIW to see what process has that local … | |
Re: Do your neighbors both have the same ISP? Hop on to their network and go to [url]www.whatismyip.com[/url] and do an nslookup on the IP it gives you and look at the hostname. They should both be .bellsouth.com or whoever provides service in your area. It is possible one of the … | |
Re: Sure you can. What I would is import the .CSV file to another table then: [code=sql] SET IDENTITY_INSERT dbo.Email ON Insert Into Email (IdentityColumn, EmailColumn) Select IdentityColumn, EmailColumn From NewEmailTable Where NOT EXISTS ( Select * From Email (NOLOCK) Where Email.IdentityColumn = NewEmailTable.IdentityColumn ) SET IDENTITY_INSERT dbo.Email OFF [/code] You … |
The End.