2,245 Posted Topics
Re: Can you upload your project? You can .ZIP it and attach it to the thread by clicking the "Go Advanced" button. | |
Re: Try this: [code] Public Class frmRandom Dim lst As List(Of Integer) Private Sub ResetQuestions() If (lst Is Nothing) Then lst = New List(Of Integer) End If lst.Clear() Dim i1 As Integer For i1 = 1 To 100 lst.Add(i1) Next End Sub Private Function GetNextQuestion() As Integer If (lst.Count = 0) … | |
Re: No, that is a perfectly acceptable (and good) way to go about it. Its the easiest way to do a strongly-type mapping like you require in this case. | |
Re: You need a robot. They would need to open the door, walk in, wait for a table, sit down, eat an appetizer... etc. I don't know how you're going to do this with a shell script. | |
Re: Do you receive an error or does it just say failed login? Also have you ran the SQL Server Profiler to see if the query is being executed? This sounds more like an ASP.NET question than an SQL question. | |
Re: Are you open to suggestions for another design or does it have to be this way? That is going to be a mess to maintain.... | |
Re: It helps organize or flag members of a class. If you're serializing a class you may want to mark the members you want to include in serialization with an attribute, or maybe your logic serializes all public members and you only want to ignore certain members with the [icode]XmlIgnore[/icode] attribute. … | |
Re: Also take a look at: [url]http://www.daniweb.com/forums/thread209516.html[/url] [url]https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=481906[/url] There are some bugs when using Right-To-Left forms that Microsoft has acknowledged but does not plan on fixing. | |
Re: Why not just show it modally? [code] private void button1_Click(object sender, EventArgs e) { using (frm1 frm = new frm1()) { frm.ShowDialog(); } } [/code] | |
Re: 1) Yes. You can store it in a library if it is versatile enough where it is reasonable to assume that you could benefit from using it in 2+ projects. 2) What do you mean? Cookies maintain a session ID on the client end so it remembers the ID but … | |
Re: [code] private void button6_Click(object sender, EventArgs e) { int i1; int i2; if (int.TryParse(textBox1.Text, out i1) && int.TryParse(textBox2.Text, out i2)) { int sum = i1+i2; textBox3.Text = "The sum is " + sum.ToString(); } } [/code] | |
Re: Here is an example: [code] private void button6_Click(object sender, EventArgs e) { int i1; int i2; if (int.TryParse(textBox1.Text, out i1) && int.TryParse(textBox2.Text, out i2)) { int sum = i1+i2; textBox3.Text = "The sum is " + sum.ToString(); } } [/code] | |
Re: [code] cmd = new SqlCommand("update toys set type=@type,item=@item,quan=@quan,price=@price,tid=@tid [COLOR="Red"]where s_no=@s_no[/COLOR]", con); [/code] | |
Re: I think you mean 'extract' the numbers? If so: [code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i1 As Integer For i1 = 0 To TextBox1.Text.Length - 1 If (Char.IsNumber(TextBox1.Text(i1))) Then TextBox2.Text += TextBox1.Text(i1) End If Next End Sub [/code] | |
Re: Make sure you call .BeginEdit() when you start to edit data and call .EndEdit() before you update the table adapter. Sometimes that will cause values to be lost. | |
Re: What happens if the date is '2009-08-01', does it go back to 7/30 or does it go to 8/30? | |
Re: Please use code tags when posting code on daniweb: [noparse] [code=c#] ...code here... [/code] [/noparse] Also please direct ASP.NET questions to the [URL="http://www.daniweb.com/forums/forum18.html"]ASP.NET Forum[/URL] Post the contents for the master page and the content form for the master page. That is a rather odd error because the content place holder … | |
| |
Re: Ryshad: I don't agree with that approach, you should always go to the source to check for values. If not you leave an opportunity for the values to become desynched and it will load to a bug. It will probably work 99.9% of the time but that other 0.1 bothers … | |
Re: You can use LINQ too! [code] using System; using System.Collections.Generic; using System.Text; using System.Linq; namespace daniweb.console { public static class Main5 { public static void Main() { List<int> lst = new List<int>(); Console.WriteLine("Enter 10 numbers"); while (lst.Count < 10) { Console.Write("Enter number #[{0:F0}]: ", lst.Count + 1); int i; if … | |
Re: [QUOTE=ddanbe;997922]Hi, working all summer on your project? [/QUOTE] Haha.. you're killing me today. Thats your second post in the last hour that made me laugh and irritated my cough :P It seems he has been working on it a while: [url]http://www.daniweb.com/forums/thread226118.html[/url] [url]http://www.daniweb.com/forums/thread198070.html[/url] [url]http://www.daniweb.com/forums/thread198064.html[/url] [url]http://www.daniweb.com/forums/thread197560.html[/url] [url]http://www.daniweb.com/forums/thread196576.html[/url] [url]http://www.daniweb.com/forums/thread196575.html[/url] | |
Re: This is an odd task. As danny pointed out the generic list is definetly the way to go! You could do something like this: [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.IO; namespace daniweb { public partial class frmWeirdHomework … | |
Re: >> 1)What are different types of Cursors? [url]http://www.databasejournal.com/features/mssql/article.php/1439731/Using-SQL-Server-Cursors.htm[/url] >> 2)What are diff types of locks? [quote] <table_hint> ::= [ NOEXPAND ] { INDEX ( index_value [ ,...n ] ) | INDEX = ( index_value ) | FASTFIRSTROW | FORCESEEK | HOLDLOCK | NOLOCK | NOWAIT | PAGLOCK | READCOMMITTED | … | |
Re: Can you post your code? This probably depends on the implementation of scrollbars in the panel | |
Re: Use -i for in-place replacement and do this: [code] sk@sk:/tmp$ cat >> file << _EOF_ > line1 > line2 > line3 > line4 > line5 > _EOF_ sk@sk:/tmp$ sed -i '3 s/.*/Your Replacement Here/g' file sk@sk:/tmp$ cat file line1 line2 Your Replacement Here line4 line5 sk@sk:/tmp$ [/code] Notice the [icode]sed … | |
Re: Yeah I submitted a bug report to Microsoft and they confirmed it was a bug, but not important enough to fix. :( | |
Re: [QUOTE=Ancient Dragon;980879]IMO code snippets should be code that requires mod approval to get posted. I saw nothing wrong with it they way it was before -- at least everyone knew where to find them.[/QUOTE] I liked it the way they were where they had their own section. I don't know … | |
Re: [URL="http://support.microsoft.com/kb/914277"]How to configure SQL Server 2005 to allow remote connections[/URL] [URL="http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/"]Enable Remote Connection on SQL Server 2008 Express[/URL] | |
Re: Make a copy of your access database, truncate the tables, add a test row in each table, and upload the database. | |
Re: Why don't you call [icode]Process.Start()[/icode] and create a new instance? I don't know why you would _want_ to implement what you are describing but it is a neat idea ;) It probably has something to do with that visual studio hosting process. It always mucks my projects up so I … | |
Re: Please use code tags when posting code on daniweb: [noparse] [code] ....code here.... [/code] [/noparse] That code uses an unitialized value and it won't compile so that can't be the code you are using. Please post your full unit in code tags so we can review. Even so calling time2.ToString() … | |
Re: It looks like you need to be root in order to do that. Try using [icode]sudos -s[/icode] and entering your password, or [icode]su -[/icode] and entering the root password. As root you can [icode]make install[/icode] | |
Re: Daniweb!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! That is all you need for entertainment :) | |
Re: You don't get it with a table adapter :) If you use a typed dataset it will: Insert the record (using your insert query) Get the scope identity Select your record where id = scope_id() (using your select query) I find it rather harder to use the built in datasets … | |
Re: I had to do that to open a quickbooks cash drawer once. Here is how I went about it: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.IO; using System.Management; using System.Net; using System.Reflection; using System.Runtime.InteropServices; using System.Windows.Forms; ... [DllImport("kernel32.dll", SetLastError = true)] public static extern … | |
Re: How are you trying to insert the data? Typically binary inserts are done with applications and not directly from TSQL, and inside of the applications you use ADO.NET/Native SQL parameters. You set the parameter to a byte[] array and execute the query. This all depends on the language you are … | |
Re: Is this a solaris machine? You can try using GNU's awk which won't throw this error. The name for it is "gawk". You should be able to get solaris package files for GNU utils. I think [url]www.ibiblio.org[/url] has them on their FTP site. | |
Re: What are the "top processes"? Highest CPU time, most memory usage, most disk IO? | |
Re: You could also override the tab behavior of your form. In my case this DataGridView is databound to "dt" which is a datatable. You'll have to handle the adding of a new row depending on how you implemented the grid: [code] protected override bool ProcessTabKey(bool forward) { if (forward && … | |
Re: You declared the Enum inside of a class. You can declare enums directly in the namespace like you're accustomed to: [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 { public partial class frmEnums : Form { public frmEnums() { … | |
Re: If you have a good database design and properly indexed tables then you're good to go. You can safely have millions of records in a single table and it will barely make MSSQL break a sweat ;) The total length of the table row could be a problem but you … | |
Re: You can also use a [icode]HashTable[/icode] to access the columns by names. I think that is along the lines of what you may want if the other (better!) solutions don't pan out :) DdoubleD/Antenka showed great ways to go about it. | |
Re: First off your example is incorrect. The "TableA" structure has jmlMuat in your table data, but in your query it has jmlBongkar. It looks like you swapped the tables ;) Try this: [code=sql] IF OBJECT_ID('tempdb..#TableA', 'U') IS NOT NULL DROP TABLE #TableA IF OBJECT_ID('tempdb..#TableB', 'U') IS NOT NULL DROP TABLE … | |
Re: I figured serkan would be all over this thread :P I hate installers As far as I know you can't set a break point but what you can do is make a call to [icode]Debugger.Break()[/icode] [code] namespace daniweb.installerex { [RunInstaller(true)] public partial class Installer1 : Installer { public Installer1() { … | |
Re: Use the docking property. Set the DockStyle = DockStyle.Fill; | |
Re: stoymigo: Also [URL="http://www.daniweb.com/forums/private.php?do=newpm&u=267883"]send a private message to serkan sendur[/URL]. He is our local installer guru and he would be more than happy to assist you! | |
Re: There is no download finished process that I know of. What are you trying to do? This sounds more like a browser plugin than a separate application. You can probably get the firefox "Download" window by its caption but that won't indicate if the download has finished | |
Re: Don't you get an external IP address when you connect with your modem, thus you don't need to port forward unless you're sharing the modem connection with other PCs on your network? Is the game server on the machine that is dialing the connection? | |
Re: Use [icode]reset[/icode] to reset your shell. You can use [icode]cat /dev/urandom[/icode] to get random junk data which should screw your terminal up, then issuing a reset should fix it. No -- This will not reboot your computer :) | |
Re: By default normal users do not have execute rights on newly created sprocs. Here is how you would grant execute rights on a sproc called "LockRow" to "DOMAIN USERS": [code=sql] GRANT EXECUTE ON dbo.LockRow To [DOMAIN USERS] [/code] |
The End.