2,245 Posted Topics

Member Avatar for johnyjj2

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]

Member Avatar for sknake
0
291
Member Avatar for delhiris

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 …

Member Avatar for sknake
0
72
Member Avatar for bhavna_816

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, …

Member Avatar for sknake
0
140
Member Avatar for mukeshpanth

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]

Member Avatar for sknake
0
32
Member Avatar for penguin22

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 …

Member Avatar for sknake
0
125
Member Avatar for Rhuntsman21

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...

Member Avatar for sknake
0
123
Member Avatar for nicka

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 …

Member Avatar for sknake
0
290
Member Avatar for GoS-ExiGo

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 …

Member Avatar for sknake
0
162
Member Avatar for echo off

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 …

Member Avatar for echo off
0
163
Member Avatar for smileyc

[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 …

Member Avatar for emint
-1
4K
Member Avatar for avirag

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 …

Member Avatar for ddanbe
0
537
Member Avatar for mansi sharma

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" …

Member Avatar for mansi sharma
0
487
Member Avatar for getkiran1

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.

Member Avatar for Diamonddrake
0
231
Member Avatar for si01

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"); …

Member Avatar for si01
0
92
Member Avatar for milhero

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?

Member Avatar for milhero
0
351
Member Avatar for tig2810

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

Member Avatar for tig2810
0
205
Member Avatar for snakay

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 == …

Member Avatar for snakay
0
92
Member Avatar for coollife

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.

Member Avatar for sknake
0
79
Member Avatar for AshokConcord

Try quoting the input to curl: [code=bash] curl --silent POST "${url}" < rss.txt [/code] That is the only thing I see different

Member Avatar for sknake
0
172
Member Avatar for abhifanatic
Member Avatar for 666kennedy

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 …

Member Avatar for sknake
0
500
Member Avatar for forestwwq
Member Avatar for darkocean
Member Avatar for darkocean
0
652
Member Avatar for nkarvi

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.

Member Avatar for sknake
0
78
Member Avatar for Keatea

[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 …

Member Avatar for sknake
0
163
Member Avatar for nosralr

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?

Member Avatar for sknake
0
146
Member Avatar for johnyjj2

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. …

Member Avatar for sknake
0
226
Member Avatar for akari0283

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 …

Member Avatar for akari0283
0
77
Member Avatar for thanatos1

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 …

Member Avatar for DdoubleD
0
192
Member Avatar for staticvoyager

Upload your project with the .CSV file inside of the zip. That is a lot of code to debug without it :)

Member Avatar for staticvoyager
0
109
Member Avatar for flipjoebanana
Member Avatar for DdoubleD

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 :)

Member Avatar for DdoubleD
0
136
Member Avatar for babbu

[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.

Member Avatar for sknake
0
37
Member Avatar for vb89

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!

Member Avatar for sknake
0
111
Member Avatar for functionalCode

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 …

Member Avatar for functionalCode
0
102
Member Avatar for guiman

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 …

Member Avatar for sknake
0
80
Member Avatar for Dmennite

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); } …

Member Avatar for Dmennite
0
201
Member Avatar for q8_dreamy
Member Avatar for Dimansu

Are you sorting it inside the listview or is it databound and are you sorting it when you bring the data forward?

Member Avatar for sknake
0
3K
Member Avatar for nkarvi

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 …

Member Avatar for nkarvi
0
113
Member Avatar for Piya27

What database are you using? You can also use Excel automation to extract the data but I would use the OleDb approach outlined above.

Member Avatar for Piya27
0
170
Member Avatar for steven.culshaw

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 …

Member Avatar for sknake
0
128
Member Avatar for Tank50

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 …

Member Avatar for sknake
0
98
Member Avatar for Link82

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 …

Member Avatar for sknake
0
161
Member Avatar for bshyama24@gmail

You can follow an online example at: [url]http://www.codeguru.com/csharp/csharp/cs_webservices/tutorials/article.php/c5477[/url]

Member Avatar for sknake
0
181
Member Avatar for kandimalla

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 …

Member Avatar for sknake
0
159
Member Avatar for Bigead

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 …

Member Avatar for manybox
0
185
Member Avatar for soham100

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 …

Member Avatar for sknake
0
102
Member Avatar for grindy

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 …

Member Avatar for sknake
0
127
Member Avatar for oddvalue

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 …

Member Avatar for cgyrob
0
242

The End.