2,245 Posted Topics
Re: I don't understand your question or why you created a poll | |
Re: Post your code. If you handle a mouse event that should not be handled then it would stop the buttons from firing the event like you are describing. However these problems are complex in nature so you should probably upload a sample project :) | |
Re: Using data adapters, command builders, etc is a little bit of overkill for the task at hand. As adatapost suggested you will want to use [icode].ExecuteScalar()[/icode]. Also keep in mind if the query may ever grow you will want to use a [icode]DataTable[/icode]. [code=csharp] const string connStr = "Data Source=apex2006sql;Initial … | |
Re: That isn't going to work quite the way you think if you want the formatted text. Websites use a combination of CSS, in-line styling, javascript after the page loads, and probably other means of formatting a site. Do you want *just* the text or do you want to display the … | |
Re: Look at the [icode]System.IO.Ports[/icode] namespace for the [icode]SerialPort[/icode] class. Here is an example from the MSDN library: [code=vb.net] Imports System Imports System.IO.Ports Imports System.Threading Public Class PortChat Shared _continue As Boolean Shared _serialPort As SerialPort Public Shared Sub Main() Dim name As String Dim message As String Dim sComparer As … | |
Re: You want to use [icode]ROW_NUMBER()[/icode] with [icode]OVER[/icode] on the grouping columns. I don't have access to a SQL Server at the moment but you can see how to do this at: [url]http://www.4guysfromrolla.com/webtech/010406-1.shtml[/url] This is the example you will want to look at. Its roughly half way down the page: [code=sql] … | |
Re: [icode]~Methods[/icode] are finalizers and not identical to destructors as you may be used to. You should implement the [icode]IDisposable[/icode] interface on the class that encapsulates or uses the word document and clean up the unmanaged resource there. To ensure [icode].Dispose()[/icode] is called you should use the [icode]using()[/icode] claused. [code=csharp] using … | |
Re: You're probably better off asking questions like this in the SEO forums. My *personal* opinion is that you should not alter the site based on the client IP or referring URL as these will likely get you penalized, as you have seen. I'm guessing you don't want to purchase a … | |
Re: See: [url]http://www.daniweb.com/forums/thread212547.html[/url] [url]http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/ed16357b-f7a9-4c17-a22c-edfadb045ec9[/url] [url]http://www.codeproject.com/KB/dotnet/clickOnce.aspx?msg=1649043[/url] | |
Re: The "*nix operating system"s for the most part are open source so you can take a look at the code. You can also use [icode]strace[/icode] [code] sk@sk:~$ strace -s 5000 mkdir abc123456 execve("/bin/mkdir", ["mkdir", "abc123456"], [/* 22 vars */]) = 0 uname({sys="Linux", node="sk", ...}) = 0 brk(0) = 0x804e3e8 access("/etc/ld.so.nohwcap", … | |
Re: The nice command does what you are asking and top is a process manager. I don't understand your goal. | |
Re: You need your GA code on every page in your site. For your sake I hope you are using master pages so you can implement the code in one place and have it take effect for your entire project. Here is an example: [code=asp.net] <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PagePost.aspx.cs" Inherits="daniweb.web.PagePost" … | |
Re: First off this is a horrible idea. To answer your question: [code=sql] IF OBJECT_ID('Category', 'U') IS NOT NULL DROP TABLE Category -- GO -- Create Table Category ( RecordId int identity(1000, 1) PRIMARY KEY, --You need a unique identifier CategoryId int UNIQUE, Name varchar(100) ) -- GO -- IF OBJECT_ID('GetNextCategoryId', … | |
Re: Stop building your queries dynamically and treating the money as string would be a good start. Use parameterized SQL: Here is a select example but just change your insert queries and use @Parameters [code=vb.net] Imports System Imports System.Collections Imports System.Data Imports System.IO Imports System.Xml.Serialization Imports System.Windows.Forms Imports System.Data.SqlClient Public Class … | |
Re: [b]Please take the time to spell out "your" instead of "ur" when posting on Daniweb[/b] .NET favors machine level and user level configuration files over the registry. I would suggest you "revize ur methodz"(sic) | |
Re: 1. I wouldn't include the GPA on a resume to begin with. This is just a personal preference but I have talked to a number of people in charge of hiring for larger corporations and they require that information however they usually ask for transcripts -- not just GPA. They … | |
Re: I would do both. Send out the postcards and then a few days after they have been mailed give the companies you mailed the cards to a call. They may have taken the time to read your postcard in the last few days and will recognize the name and are … | |
Re: I never found a solution to the exact same problem you're having. I had a BE project that did transaction posting to a payment gateway and I tested it on a winform application and it worked perfectly .. then when I used it from a web application assembly it failed … | |
Re: You don't want to use the MAC address. [quote] The MAC layer addressing mechanism is called physical address or MAC address. This is a unique serial number assigned to each network adapter, making it possible to deliver data packets to a destination within a subnetwork, i.e. a physical network consisting … | |
Re: I think you could use javascript to 'record' the last focused textbox and grab that information client side and populate the textBox. If you're wanting the button to populate the text on a server side postback then you could use a hidden form field to pass back the last focused … | |
Re: I would recommend creating a PDF report that the user can print with Adobe. You can't get enough control over printing and margins in my opinion to justify spending the time on having an HTML site print properly. This will also ensure your reports are identical if you mail them, … | |
Re: Bash is a script language so it is interpreted, not compiled. Is this a question regarding bash scripting or c/c++ compilation? You may try the programming forums for compiled languages. | |
Re: The data actually starts on line 14 from what I could tell, not line 10. Try this: [code=bash] sk@sk:/tmp/txt$ cat ba.sh #!/bin/bash for i in `find ./ -iname \*.txt`; do more +14 ${i} | egrep -v '^$' | awk -v filename=${i} -F"\t" ' BEGIN {OFS="|"} {print $2,$14,$15,filename} ' done sk@sk:/tmp/txt$ … | |
Re: Here is an example of connecting to MSSQL and pulling back a result set: [code=vb.net] Imports System.Data.SqlClient Public Class FormSql Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Const connStr As String = "Data Source=apex2006sql;Initial Catalog=Leather;Integrated Security=True;" Const query As String = "Select Top 30 * … | |
Re: In your apache configuration file you could set the webserver to listen on two different addresses -- one for the LAN and one for the WAN. You could have the webserver serve up different content based on the virtual host. Will this solve your issue? | |
| |
Re: From my testing you can simply look at the richTextBox.Text property get the words without RTF formatting. Likewise you can access richTextbox.RTF to get the rich text. [code=csharp] string[] words = System.Text.RegularExpressions.Regex.Split(richTextBox1.Text, @"\W", System.Text.RegularExpressions.RegexOptions.Multiline); [/code] | |
| |
Re: Use an autoincrement column. [code=sql] Alter Table Receipt Add ReceiptNo int identity(1000, 1) [/code] | |
Re: Something is wrong with your project. Are you only testing in DEBUG mode and shipping the code in RELEASE? Do you have a separate DataSet project or are they included in the 'executing' assembly? Also did you copy the *.dll's for your site to the bin\ directory when you deployed? … | |
Re: This sounds like a horrible idea but to answer your question: [code=csharp] private void button5_Click(object sender, EventArgs e) { string[] args; if (string.IsNullOrEmpty(textBox1.Text)) return; else args = textBox1.Text.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); string cmd = args[0].ToLower(); switch (cmd) { case "createfile": if (args.Length == 2) System.IO.File.WriteAllBytes(args[1], new byte[0]); … | |
Re: [code=sql] Insert Into Table1 (aColumn) Values ('aValue') Insert Into Table2 (aColumn2) Values ('aValue2') [/code] | |
Re: That zip file threw 40 decompression errors when I tried to deflate it. What did you use to pack it? | |
Re: Please use code tags when posting on daniweb. You can compare dates using comparison operators: private void button4_Click(object sender, EventArgs e) { DateTime dt1 = DateTime.Now; DateTime dt2 = DateTime.Now.AddDays(-1); if (dt1 > dt2) { MessageBox.Show("greater"); } } If the date is in mm/dd/yyyy then what is your locale settings? … | |
Re: Sure. I posted code for this task using an image but it is the same thing --- uploading binary data to the SQL Server. This does not handle the file upload itself with ASP.NET but handles the SQL-stuff for storing an image: [url]http://www.daniweb.com/forums/post940891.html#post940891[/url] | |
Re: Buy a license for 2008? I don't understand what you are asking | |
Re: Turn off file sharing or remove all of your visible network shares. Then punch the guy next to you and tell him to stop :) | |
Re: That code is modifying the underlying collection inside of the foreach. In this case it doesn't hurt anything per se but there is probably a reason where this could break something thus the exception. I usually build lists of items I intend to modify before/after a foreach. Here is one … | |
Re: You don't have to have the libraries in /usr/lib in order to compile an application. Take a look at this page: [url]http://linuxmafia.com/faq/Admin/ld-lib-path.html[/url] You *can* set LD_LIBRARY_PATH but it is not recommended. Please see if the site satisfies the compilation issue for you, if not then please post the name(s) of … | |
Re: That is the default behavior. Here is a test class: [code=csharp] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace daniweb { public delegate void OnSerkanEvent(object sender, SerkanEventArgs e); public class Serkan { public event OnSerkanEvent OnEvent; public Serkan() { } public void DoWork() { if (this.OnEvent != null) { … | |
Re: Why don't you create your own certificate and sign it? Since your domain is "wanaque.local" then you obviously don't need the certificate internet facing. You should install the certificate authority packages on your domain controller and start issuing certs. You should be able to push out your CA key to … | |
Re: No ... you're backing up a copy of an existing database, so you want to restore the database as-it-was. The original database should have multiple filegroups if that is how you are intending for it to operate. You could basically duplicate the structure and replicate the data to the new … | |
Re: You can do a "hot copy" of the database but this is not recommended. You need to close and dispose of all your OleDb connectors to the database in your application before you try to access the file. In order to access a file that is in use you need … | |
Re: I'm not sure I understand what you are asking but you can do many things. [code=csharp] private void button4_Click(object sender, EventArgs e) { object o = new string('x', 5); if (o is int) MessageBox.Show("It is an integer.."); else if (o is string) MessageBox.Show("It is a string"); else MessageBox.Show(string.Format("Unknown type: {0}", … | |
Re: [b]Do not do that! Use parameterized SQL[/b] to stop SQL injection and help server performance. Assembling the queries dynamically like that is what leads to SQL Injection vulnerabilities in the first place! This depends a lot on what language you are developing in but here is an ASP.NET/C# example: [code=csharp] … | |
Re: [icode]CSVReader[/icode] is not a class in the .NET framework as far as I can tell so it depends -- did you write this class or do you have access to the source code? If not then it is a sealed class or can you derive another class from it? All … | |
Re: You do not want to bring the password back in a select statement for security reasons. Do what jbisono suggested and send the data to the database. If you try to select the user "Where username = @username and password = @password" then it will return 0 rows since the … | |
Re: Google this term: "sql server allow remote connections 2008" By default the express editions of SQL do not allow remote connections [url]http://www.google.com/search?hl=en&q=sql+server+allow+remote+connections+2008&aq=1&oq=SQL+Server+allow+remote&aqi=g4[/url] | |
Re: I doubt it -- what is the problem with reinstalling anyway? It only takes a few minutes to back up all the databases, reinstall, and restore the databases. |
The End.