2,245 Posted Topics
Re: You should also implement [icode]IConvertible[/icode] and [icode]IFormattable[/icode] | |
Re: Your SQL syntax is invalid. Typically you use [icode]Distinct()[/icode] on a single column. I'm not sure if this is the exact syntax with Access but this is how it would work in MSSQL: [code=sql] Select Model, Make, Problem, HP From Makers Group By Model, Make, Problem, HP Order By Model, … | |
Re: [B]>>A co-worker keeps telling me that Integers are "slower" to search on, which I find a bit hard to believe[/B] He's an idiot. Integers are fine. Just be sure to index your database properly -- and this is regardless of datatype (string, integer, decimal, etc). | |
Re: Upload your search engine project again demonstrating the behavior and we will take a look at it............................................................................................................................................ | |
Re: [QUOTE=ddanbe;894959]Besides the fact that there exists a generic [B]LinkedList [/B]class which can do these things for you, you might consider to put your code in CODE TAGS. Nobody will even try to feel the need to start reading your code if you don't.[/QUOTE] I agree. I read the thread and … | |
Re: What type of SQL Connection is that? MSSQL? MySQL? Why are you declaring the command parameter as a char if it is a date value? | |
Re: Why don't you handle this task at the application layer instead of the DB layer? Often time the MSSQL Service is not running with administrative rights and does not have filesystem access to the root drive of the disk, ie C:\ | |
Re: Please post a network diagram of your networks. VPNs get screwy if you try to connect to a remote VPN that gives you an IP on the same network segment that your local network interface card is on. Post the local ip of both machines, subnet, default gateway, and how … | |
Re: You could also use awk: [code] sk@svn:~/devex$ df -h | awk '{ print $1,$2,$5 }' [/code] | |
Re: As danny suggested it depends. The only consideration I want to throw in here is cleanup. Be [b]sure[/b] to clean up and [icode]Dispose()[/icode] of any controls you create that may have not been added to the control list of the form. | |
Re: Test it and find out. The different will be negligible either way so I would concern myself with "which code base is easier to maintain". If you're looking for blazing-fast performance then .NET is [b]not[/b] the way to go. Also using the [icode]SqlDataReader[/icode] like that could be considered slower because … | |
Re: I would forget about using microsoft's collaboration tools. I would switch over to [URL="http://subversion.tigris.org/"]Subversion[/URL]. I have never gotten their versioning control code to work like I think it should and I have seen many complaints about it. Subversion has a lot of third-party plugins for creating tickets, generating reports, etc … | |
Re: asl? On another note we don't contribute to the delinquency of minors on daniweb. Listen to your parents. Do well in school. Get a good job... | |
Re: How is your datagrid being bound? It is usually easier to work with the underlying data as opposed to the grid. | |
Re: Upload a sample project demonstrating the behavior you are currently experiencing and how you would like it to work. I'm afraid I don't understand what you are asking. | |
Re: Please post the code you are using to encrypt/decrypt the data. | |
Re: You can compare the string value if you're trying to determine if they are identical: [code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If (String.Compare(TextBox1.Text, TextBox2.Text, True) = 0) Then 'Same value End If End Sub [/code] To do it like you're supposed to you … | |
Re: Please use code tags when posting code on daniweb: [noparse] [code] ...code here.... [/code] [/noparse] Please go back and edit your last post, or post the error message again in code tags. I cannot read your post with the formatting the way it is. | |
Re: Use contains: [code] Public Class frmComplete Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ProcessString(TextBox1.Text) End Sub Private Sub ProcessString(ByVal s As String) If (s.Contains("time")) Then End If End Sub End Class [/code] | |
Re: I'm glad you found a solution and you posted it back here :) Please mark this thread as you have answered your own question and good luck! | |
Re: Store the link in a database with a "CreateDate" field. Then when you hit the URL [icode]Select * From LinkTable Where CreateDate >= ... and link = 'aaa'[/icode] and if you bring back 0 rows send the client a 404 message. | |
Re: You need to your installer to an existing project that has your vb.net executable project inside of it. You should be able to go to "File -- New Project" and in the new project window you have an option to "Add to solution" instead of create new. | |
Re: You should add a launch condition to your installer to test for versions of the .NET framework. I don't recommend adding in the framework in your installer but when you add a launch condition it will redirect them to the Microsoft website to download the necessary files. If you include … | |
Re: Why not load it in to a [icode]DataTable[/icode]? [code] private void button9999_Click(object sender, EventArgs e) { const string connStr = "Data Source=apex2006sql;Initial Catalog=Leather;Integrated Security=True;"; const string query = "Select * From Invoice Where InvNumber = @InvNumber"; using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); using (SqlCommand cmd = new SqlCommand(query, … | |
Re: You can use [icode]DateTime.Today.Year[/icode] to get the current year. I use [icode]Math.Min()[/icode] and the year it was compiled to stop an older year from showing up since you know it must be >= compiled year. [code] Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Text = … | |
Re: You can save the dataset schema (structure) along with table data. This uses a dynamically created DataSet/DataTable but it will work for typed datasets as well. Creating, Populating, and persisting the dataset: [code] private void button1_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds.EnforceConstraints = true; //enforce locally … | |
Re: I don't understand what you're doing here. Why not just have a timer update update the progress bar and when the timer calculates 100% position then do whatever you need to after that. | |
Re: Please post what code you have so far and explain what you are trying to accomplish more clearly. | |
Re: You should refactor [code] log.wtl("Interfejs zaktualizowany"); [/code] to: [code] log.wt[B][COLOR="Red"]f[/COLOR][/B]("Interfejs zaktualizowany"); [/code] Its more fun :) | |
Re: The one advantage SQL Server has over most other database forms is concurrency. Since you are running in a web app you may have a time where two people are trying to use the same database at once. You could very easily implement the solution danny linked to for your … | |
Re: Here is a start to your solution. [code] #!/bin/bash filename="/home/sk/daniweb/scripts/data.txt" exec<${filename} value=0 declare -a arr while read line do varray=(`echo $line | awk '{ split($0, ulist, "|"); for(i=1; i<=11; i++) printf ulist[i] " "; }'`) echo "Array Length: " ${#varray[@]} done [/code] That will read the input from your file … | |
Re: It looks like you already have been given an answer to your question :) You can also see if the node is the top-most node by looking at the node collection: [code] namespace daniweb { public partial class frmTree2 : Form { public frmTree2() { InitializeComponent(); } private void frmTree2_Load(object … | |
Re: [code] private void button1_Click(object sender, EventArgs e) { DateTime dtToday = DateTime.Today; DateTime dtFuture = DateTime.Today.AddDays(180); TimeSpan difference = dtFuture.Subtract(dtToday); } [/code] | |
Re: The original search method I wrote in that application used a percentage of result but you requested it to be an exact match so the program was modified. Now you want the percentage back? Take a look at the old threads, you will find the code. | |
Re: You could also use [icode]string.Compare()[/icode]: [code] Dim s1 As String = String.Empty Dim s2 As String = String.Empty If (String.Compare(s1, s2, True) = 0) Then 'Correct End If [/code] | |
Re: Yes. The DNS request is resolving to an external IP and should be resolving to an internal IP, or you need to configure your router to NAT on packets inbound from the LAN port to simulate an external connection. This is a very common problem. | |
Re: You shouldn't pivot a table (rows -> columns) dynamically. Lets say one person does 10k hurdles where the rest only have done 3... then everyone will have 9k columns of NULLs since they didn't have nearly enough data to pivot. You should probably tackle this issue at the application level … | |
Re: Try something like this: [code] private void btnAdd_Click(object sender, EventArgs e) { //Must be an integer int scoreInput; if (string.IsNullOrEmpty(txtScore.Text) || !int.TryParse(txtScore.Text, out scoreInput)) { txtScore.Focus(); MessageBox.Show("Please enter a valid score", "Input Error"); txtScore.Focus(); //in case they double click the message and select another ctrl return; } else if ((scoreInput … | |
Re: That is invalid SQL and normally I would post the correct SQL but I have no clue what you're trying to do. Valid SQL is simply: [code=sql] Insert Into dbo.customers (col1, col2) Values (@val1, @val2) [/code] Are you trying to [icode]UPDATE[/icode] the table instead of [icode]INSERT[/icode] maybe? [code=sql] Update dbo.Customers … | |
Re: I didn't know about INFORMATION_SCHEMA.Tables ;) I have used this in the past: [code] Select name From sysobjects Where Type = 'u' [/code] | |
Re: Please post your solution to this thread so if others happen across it they can see how to fix the problem. Also be sure to mark this thread as solved when you post back the solution. Good luck! | |
Re: Does the first row in the csv contain the column names? | |
Re: What is a "version date"? Is this a constant you have defined in the application? You can set a label's text to contain a date value like this: [code] private void frmAboutUs_Load(object sender, EventArgs e) { label1.Text = string.Format("Version compiled on {0:d}", DateTime.Today); } [/code] | |
Re: You need to define logic for how you would score the password strength but here is an example: [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; namespace daniweb.pwstrength { public partial class Form1 : Form { const int PASS_MIN = 0; … | |
Re: I don't understand your question. The MTU is set as 1500 on 99.9% of machines (ethernet) or 576 for dialup but you also have part of the 1500byte packet reserved for routing and protocol information (routing: source ip, dest ip, prev/next hop, ttl, vlan tag) so you only have ~1460 … | |
Re: And if they plug this USB device in to a non-windows system...? | |
Re: If the tables have a 1:1 relationship: [code] Select ( select Top 1 Pro_ID from Projects where Dep_ID in ( select Dep_ID from Departments where name = 'test' ) ) As PRO_ID, ( select Top 1 Emp_ID from Employees where Dep_ID in ( select Dep_ID from Departments where name = … | |
Re: [code] IF OBJECT_ID('tempdb..#DateTable', 'U') IS NOT NULL DROP TABLE #DateTable Create Table #DateTable ( [Date] DateTime ) DECLARE @Begin DateTime, @End DateTime, @dt DateTime Set @Begin = Cast(Floor(Cast(GetDate() as float)) as datetime) Set @End = Cast('12/31/2020' as DateTime) Set @dt = @Begin SET NOCOUNT ON WHILE (@dt <= @End) BEGIN … | |
Re: Welcome to daniweb! Please use code tags when sharing code on daniweb. You need to use brackets in your `if` statements to restrict the program to running relevant code: if (roomType == 'a') { console.write("how many nights would you like to stay"); howManyNights = convert.ToChar(console.ReadLine()); cost = howManyNights * 22; … |
The End.