2,245 Posted Topics

Member Avatar for mejohnm

You should also implement [icode]IConvertible[/icode] and [icode]IFormattable[/icode]

Member Avatar for mejohnm
0
106
Member Avatar for jetjash

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

Member Avatar for sknake
0
133
Member Avatar for Wenners

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

Member Avatar for sknake
0
138
Member Avatar for avirag

Upload your search engine project again demonstrating the behavior and we will take a look at it............................................................................................................................................

Member Avatar for sknake
0
134
Member Avatar for ramprakash2489

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

Member Avatar for sajid syed
0
230
Member Avatar for beginerC#

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?

Member Avatar for beginerC#
0
269
Member Avatar for vuyiswamb

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

Member Avatar for vuyiswamb
0
97
Member Avatar for crazyboy

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 …

Member Avatar for crazyboy
0
98
Member Avatar for Impact4ever
Member Avatar for sknake
0
172
Member Avatar for RunTimeError

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.

Member Avatar for sknake
0
132
Member Avatar for mahendra dubey

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 …

Member Avatar for sknake
0
92
Member Avatar for mnewsome

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 …

Member Avatar for sknake
0
93
Member Avatar for Missy!

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

Member Avatar for kalia247
-9
241
Member Avatar for LennieKuah

How is your datagrid being bound? It is usually easier to work with the underlying data as opposed to the grid.

Member Avatar for LennieKuah
0
167
Member Avatar for kool.net

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.

Member Avatar for kool.net
0
132
Member Avatar for cockypig
Member Avatar for sknake
0
86
Member Avatar for snip

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 …

Member Avatar for sknake
0
93
Member Avatar for bk_bhupendra

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.

Member Avatar for Antenka
0
281
Member Avatar for xVent

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]

Member Avatar for xVent
0
102
Member Avatar for quickershopper

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!

Member Avatar for sknake
0
121
Member Avatar for love_dude1984

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.

Member Avatar for sknake
-1
81
Member Avatar for dre-logics

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.

Member Avatar for sknake
0
127
Member Avatar for nccsbim071

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 …

Member Avatar for sknake
0
186
Member Avatar for Krstevski

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

Member Avatar for Krstevski
0
4K
Member Avatar for mshravs

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

Member Avatar for mshravs
0
92
Member Avatar for eddy_boy

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 …

Member Avatar for sknake
0
1K
Member Avatar for procomp65

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.

Member Avatar for procomp65
0
307
Member Avatar for tatetg

Please post what code you have so far and explain what you are trying to accomplish more clearly.

Member Avatar for sknake
0
32
Member Avatar for mcmillan0520

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

Member Avatar for DdoubleD
0
176
Member Avatar for gotherthanthou

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 …

Member Avatar for sknake
0
116
Member Avatar for e04047

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 …

Member Avatar for natufor
0
202
Member Avatar for xyz12

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 …

Member Avatar for sknake
0
214
Member Avatar for ssreevidya.m

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

Member Avatar for Jemmie
0
84
Member Avatar for avirag

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.

Member Avatar for abc16
0
244
Member Avatar for lovely ari

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]

Member Avatar for sknake
0
93
Member Avatar for kegathor

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.

Member Avatar for sknake
0
170
Member Avatar for dfs3000my

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 …

Member Avatar for dfs3000my
0
193
Member Avatar for kool.net

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 …

Member Avatar for avirag
0
143
Member Avatar for ricksvoid

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 …

Member Avatar for mail2saion
0
150
Member Avatar for Moordoom

[code] and (loc like 'P%' or [COLOR="Red"]loc like[/COLOR] 'S%') [/code]

Member Avatar for sknake
0
100
Member Avatar for else_harpal

I didn't know about INFORMATION_SCHEMA.Tables ;) I have used this in the past: [code] Select name From sysobjects Where Type = 'u' [/code]

Member Avatar for sknake
-1
97
Member Avatar for nanat07

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!

Member Avatar for sknake
0
65
Member Avatar for santhya123
Member Avatar for Ramkumar_k

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]

Member Avatar for sknake
0
37
Member Avatar for sivananda2009

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

Member Avatar for sknake
0
517
Member Avatar for programmer.code

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 …

Member Avatar for sknake
0
114
Member Avatar for echo off
Member Avatar for Diamonddrake
-1
140
Member Avatar for Moody1

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

Member Avatar for Moody1
0
125
Member Avatar for cheapterp

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

Member Avatar for cheapterp
0
238
Member Avatar for zzbottom

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

Member Avatar for Geekitygeek
0
98

The End.