2,245 Posted Topics
Re: Please use code tags when pasting data on daniweb. In the case of stack traces you can use plain text: You need to post the code where you're binding the socket. It looks like you're opening a socket to listen for an inbound connection twice with the same listen port. … | |
Re: Here is another example of MSSQL using the between operater with parameterized SQL: [code] private void button2_Click(object sender, EventArgs e) { const string connStr = "Data Source=apex2006sql;Initial Catalog=Leather;Integrated Security=True;"; const string query = "Select * From Invoice Where (InHomeDate BETWEEN @Date1 and @Date2)"; using (SqlConnection conn = new SqlConnection(connStr)) { … | |
Re: You should repair the file from your package manager. What distro are you running? | |
Re: Yes. What directory are you trying to put the data in? Paste the output of: [code] ls -ald /path/to/dir ls -ald /path/to ls -ald /path ls -ald / [/code] Also what user are you logged in as? You can find out by typing [icode]id[/icode]. You can grant [b]everyone[/b] read/write access … | |
Re: You don't search on the image do you? Are you trying to detect duplicate images or recognize if you have an image already stored in the database? What you should do is store a checksum (md5, crc) in the database in the same row as the image and search on … | |
Re: [code] Delete from User Where UserId >= 1915 and UserId <= 1945 [/code] There is also a [icode]BETWEEN[/icode] operator you could use. | |
Re: How are you maximizing the form in code and how are you disabling the maximimize box? If you set the height and width to the entire screen then it is not truly maximized and it will let you move and resize the form. If you send it a maximize window … | |
Re: Just use [noparse][code=text][/noparse]... It preserves your formatting and uses a terminal font: [code=text] col1 col2 col3 --------------- ------------------------------ ---- abc def xyz (1 row(s) affected) [/code] | |
Re: Given the search term "othello essays" on the application front end you need to split up the search terms. I think full text indexing offers more options for weighting search results. You may want to take a look at it. Here is one way to help make it better, but … | |
Re: Check out [URL="http://www.daniweb.com/forums/thread84216.html"]this thread[/URL]. Also take a look here: [url]http://www.vbdotnetheaven.com/UploadFile/aghiondea2/StoringImagesInVB11122005034248AM/StoringImagesInVB.aspx[/url] And here is a code snippet [code] File name is Image.vb Imports System Imports System.IO Imports System.Data Public Class SaveImage Shared Sub main() Dim o As System.IO.FileStream Dim r As StreamReader Dim gifFile As String Console.Write("Enter a Valid .Gif file … | |
Re: Upload your excel spreadsheet | |
Re: Masijade answered your question but i'd like to throw something else in there. You should add checks for your arguments on the command line and verify the file exists: [code] #!/bin/bash file_name=$1 old_templet=$2 new_templet=$3 if [ "$3" = "" ]; then echo "usage: ${0} <file_name> <new_templet> <old_templet>" exit 1 fi … | |
Re: The only difference is that you are holding on to a reference of the interface versus the class. The class implements more functionality than the interface but you can also cast the interface reference to the class and still call any method. As far as efficiency there is no difference. … | |
Re: Are you referring to MDI forms or is one form on top of another? | |
What is the reason behind making a user wait 15 seconds to report posts? I often hit that limit and skip reporting a bad post because I don't want to wait for 15 seconds to expire so I keep on reading threads.... I imagine if someone was abusing the reporting … | |
Re: Could you post your solution back to this thread in case someone else happens along to read this in the future? Also don't forget to mark this thread as solved -- and good luck! | |
Re: I agree with jbennet. | |
Re: [URL="http://support.microsoft.com/kb/914277"]How to configure SQL Server 2005 to allow remote connections[/URL] By default the express editions of MSSQL don't enable remote connections. You can enable it after installation or specify to allow remote connections at installation time: [code] setup.exe /qb ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE [COLOR="Red"]INSTANCENAME=InstanceName[/COLOR] SAVESYSDB=1 SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 SECURITYMODE=SQL [COLOR="red"]SAPWD=password DISABLENETWORKPROTOCOLS=0[/COLOR] ERRORREPORTING=1 SQMREPORTING=0 … | |
Re: I don't think it allows you to override the selection like that when it is databound. You could flip/flop the display member though: [code] private void comboBox1_DropDown(object sender, EventArgs e) { comboBox1.DisplayMember = "Name"; } private void comboBox1_DropDownClosed(object sender, EventArgs e) { comboBox1.DisplayMember = "GravitationalAcceleration"; } [/code] | |
Re: [code] Select * From Table Where col1 Is Null [/code] Replace "Table" with your table name Replace "col1" with your column name | |
Re: [code] textBox1.Text = System.IO.File.ReadAllLines(@"C:\file.txt")[0]; //line 1 textBox1.Text = System.IO.File.ReadAllLines(@"C:\file.txt")[1]; //line 2 [/code] | |
Re: You're shooting yourself in the foot if you want to use ini files. Traditionally those files are stored in the same directory as the application and with windows Vista and later versions of windows you have something called virtualized folders. That means when you write to C:\Program Files\YourApp\YourFile.ini the write … | |
Re: [icode]date +%m/%d/%Y[/icode] will give you the proper format, but i'm not sure how you would append it to the last line. | |
Re: bk_bhupendra, Please stop using [noparse][quote][/quote][/noparse] quotes for all of your posts. That is intended for quoting other people when you want to reply to their post. Just post your responses in the normal whitespace of the reply box. Use [noparse][code][/code][/noparse] when posting code. | |
Re: [B]>>A colleague and I have a process where we want to look at a file we receive from a vendor (XML) and data that is in our db. In order to bypass loading the xml and comparing it once loaded we are loading the db data and xml into datatables … | |
Re: [B]>>There isn't an issue regarding it working, that's fine. What I am noticing is that when each form is set to be active/visible, it takes a few seconds to load each component, and looks horrid. This is potentially for a business related endeavor, so I'm looking for a way to … | |
Re: PDF, XLS, DOC, DOCX, it doesn't matter. The image is stored as binary on the SQL server. You just need to pull down the [icode]byte[][/icode] array and store it to disk with the proper file extension. Here is an example: [code] //Download image private void button2_Click(object sender, EventArgs e) { … | |
Re: Usually that depends on who you are banking with unless it is a smaller operation then you can use PayPal if you're in the united states. I know other countries have merchant services too. Why did you post this in the Linux Software forum? Is this for a PHP application? | |
Re: You can embed windows media player in your application which can play videos from your harddrive or stream them from a URL. Add a reference to "Windows Media Player" aka Interop.WMPLib.dll, and then navigate to the controls in that DLL (using the "customize toolbox" menu option). You will see a … | |
Re: :( MySQL is bad for your eyes. I don't know anything about it but typically you add parameters like this: [code] conn.Open(); using (SqlCommand cmd = new SqlCommand(query, conn)) { cmd.Parameters.Add(new SqlParameter("@MemberId", SqlDbType.Int)).Value = MemberId; cmd.Parameters.Add(new SqlParameter("@MemberSname", SqlDbType.VarChar)).Value = MemberSname; cmd.Parameters.Add(new SqlParameter("@MemberFName", SqlDbType.VarChar)).Value = MemberFName; cmd.Parameters.Add(new SqlParameter("@Picture", SqlDbType.VarChar)).Value = Picture; … | |
Re: Have you considered using [icode]rsync[/icode] for this task? If you really want to do this with a shell script then let me know and i'll try to dig up an example. | |
Re: This should get you started: [code] 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.Web; using System.Xml; using System.Net; using System.IO; namespace daniweb { public partial class frmStockRSS : Form { public frmStockRSS() { InitializeComponent(); } private static StockInfo GetStockInfo(string StockTicker) … | |
Re: Perhaps because you're trying to parse html/xhtml with an xml reader, and they're different formats. | |
Re: Please use code tags when posting code on daniweb: [noparse] [code] ...code here... [/code] [/noparse] It sounds like the problem you're having is specific to the communication with the device and not necessarily the .NET framework. I'm not sure I understand what your question is either. You can use an … | |
Re: Please only create threads as "code snippets" when you are sharing code with the daniweb community. Also this thread is better suited in the ASP.NET forums since you're dealing with a web app. I have answered this same question on another thread. Please take a look here: [url]http://www.daniweb.com/forums/thread209172.html[/url] | |
Re: Please use code tags when posting code on Daniweb: [noparse] [code] ...code here... [/code] [/noparse] You need to post the full code where you are reading in the file and where you are inserting it in the database. How you are communicating with the database server makes a big difference … | |
Re: I have posted a code snippet for a [URL="http://www.daniweb.com/code/snippet217409.html"]sample login screen[/URL] at: [url]http://www.daniweb.com/code/snippet217409.html[/url] | |
Re: Take a look at these articles: [url]http://www.c-sharpcorner.com/UploadFile/mgold/CodeDomCalculator08082005003253AM/CodeDomCalculator.aspx[/url] [url]http://www.bestcode.com/html/bcparser_net.html[/url] | |
Re: [QUOTE=Rashakil Fol;1024700]Don't listen to him, his complaint is logically inconsistent with the fact that you made this thread and using colors isn't going to draw extra attention to the first post of the thread.[/QUOTE] "His complaint" is: [QUOTE] I would recommend you read forum rules as with your post you … | |
Re: You should use [icode]integer.TryParse()[/icode] or [icode]decimal.TryParse()[/icode] instead of handling the exception. Throwing exceptions is a very expensive process and if you have exceptions being thrown in calculations (where it can occur over and over in loops) it can bring a system to a halt depending on the amount of data. | |
Re: Normally you would fake the sender address for UDP packets but this has been disable in the win32 core as of XP SP2 and later. If you attempt to fake the sender address it will crash your application on a very low level. That being said if you control the … | |
Re: And you would need to use a client side [icode]alert()[/icode] instead of [icode]MessageBox.Show()[/icode]. More than likely you don't want to send the user error information though for security reasons so you would want to redirect them to an "Error Page" and log the error in the event log or sql … | |
Re: Give a stronger password then.... I think the "strength" of the password can be defined in the domain controller. I have a number of stock passwords that I use for default installations and occasionally they are reject due to the same error on client networks because they enforce a password … | |
Re: You may also consider using an enumeration member to define all of your commands. This way you have a strongly typed way to reference the command. You can call [icode].ToString()[/icode] on the enumeration member and call [icode]Enum.Parse()[/icode]: [code] internal enum CommandTypes { Command1 = 1, Command2 = 2 } private … | |
Re: Create another class to encapsulate the third party library. This way you will be able to wire up events and handle any business logic when properties are being modified. | |
Re: I drop a panel on a form, open up the designer, and change the reference from [icode]System.Windows.Forms.Panel[/icode] to the user control class in the solution. There should be two lines you need to change: the definition and where it is constructed. You should also remove the lines with [icode]ISupportInitialize[/icode] | |
Re: Here are a few articles on keying ssh: [url]http://www.linuxjournal.com/article/8600[/url] [url]http://www.hostingrails.com/wiki/27/HowTo-SSHSCP-without-a-password[/url] | |
Re: [B]>>Ive always had a problem thinkin in terms of OO...my early projects were coded ENTIRELY on a single form...makes me cringe looking back lol[/B] Same thing here. I still have to support them too :X Antenka's points were all the right way to think about it. I have one more … | |
Re: I don't understand what you are asking. Can you post your table structures with sample on this thread (with code tags) and explain what you are trying to accomplish? [noparse] [code] ...code here... [/code] [/noparse] | |
Re: It depends on the mailserver. Are you using exchange, imap, .... ? |
The End.