2,245 Posted Topics
Re: XML Serialization does not figure out the type automagically. When you instantiate the XML Serializer for example: [code] XmlSerializer ser = new XmlSerializer(typeof(AcctInfo)); [/code] The .NET framework will use reflection to call the constructor for AcctInfo (or in your case furniture) that doesn't have any parameters, so new AcctInfo(). So … | |
Re: If you're not catching a key in the KeyDown event then it is probably a command key, and you need to catch it another way. Try this: [code] protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if ((keyData == Keys.Right) || (keyData == Keys.Left) || (keyData == Keys.Up) || … | |
Re: Saving voice is no different than saving any other file, it is just an audio file. Saving binary to SQL is usually not a good idea, and is not what SQL was intended for. Create a table with a varchar(max) column (BLOB), or image data type and you can stream … | |
Re: I doubt that holding the connection open will improve performance, it actually can work against you in some cases. However, you didn't paste enough of your Remote class so I could see what the problem is but you can use this logic to hold a connection open and query against … | |
Re: Here is a list of overloads for Convert.ToInt32() from the .NET framework. [code] public static int ToInt32(DateTime value); public static int ToInt32(bool value); public static int ToInt32(byte value); public static int ToInt32(char value); public static int ToInt32(decimal value); public static int ToInt32(double value); public static int ToInt32(float value); public static … | |
Re: For abstract classes try to think of the most common members of multiple classes that are all similar. An example of this is DbConnections: Oracle, SQL, OleDb, and ODBC connections... [code] public sealed class SqlConnection : DbConnection, ICloneable public sealed class OleDbConnection : DbConnection, ICloneable, IDbConnection, IDisposable public sealed class … | |
Re: Are you using the form's KeyDown or the control's KeyDown event? Since this is a calculator i'm guessing you want to catch when a user presses "*" regardless of what control has focus to handle the event. In this case you should handle the form's KeyDown event. Also you need … | |
Re: What are you trying to replicate? Or do you mean duplicate objects, like cloning? | |
Re: Check out Developer Express, they have cloned the entire office UI. Plus they have excellent support. [url]http://www.devexpress.com/[/url] | |
Re: sinkrideutan gave excellent advice. You should also check in <a> anchor tags on the site to see where it is linking. It is a small chance that an explicit URL is being defined with the IP address, but I doubt it. You will probably find the issue when you sniff … | |
Re: Why are you using an OleDB driver for ODBC instead of connecting directly with OleDB, or better yet using the Native SQL Driver? It's hard to tell because you're assembling a huge query, which is not a good idea, and is vulnerable to SQL Injection. If you use the OleDB … | |
Re: I think a better approach might be to explain what you're trying to accomplish. You cannot tell me that any user will entertain the thought of running an application with 80+ text boxes on a form. Mike's advice for iterating the controls by name will solve your problem if you … | |
Re: You haven't really said what you wanted as far the report format. Typically you need to buy a 3rd party reporting component, design the report, and feed it data. From that you can design your reports. Check out: [url]http://www.devexpress.com[/url] for a win forms reporting component, XtraReports | |
Re: [QUOTE=danielernesto;821839]In wich MSAcces version are you develop??, couse if it's in 2007 your connection it's wrong, if it´s not then you may probably have to add Trusted connection to the connection string =).[/QUOTE] I think he nailed this on the head, your connection string is probably wrong. If you connected … | |
Re: 1) DNS has nothing to do with HTTP, wrong service. Look at using bind or djbdns (if you're daring). 2) It depends on the purpose. If you want to create subdomains for the user you should offer the option of creating the hosts for them (IN A records) or giving … | |
Re: If you post a full project sample here I will be willing to take a look at it. With delayed initialization and how .NET creates controls this could be one of a number of things. | |
Re: Can you not just set the datepicker's value (in code) to DateTime.Today.Date on the form load method when you're adding a record (i'm assuming this is a create date)? | |
Re: [url]http://bytes.com/groups/net-vb/542979-permission-problem[/url] It looks like it is a .NET trust (security) issue... | |
Re: This sounds too much like something to do with spyware, viruses, or other generally annoying things. Can you explain what you are doing first? | |
Re: [code=c#] int i1 = 5; int i2 = 7; int i3 = i1 + i2; [/code] | |
Re: More than likely the IIS service cannot access that file since it should be run under an unprivelaged account, and the database you're referencing in buried in your userspace documents. Try to move the file to a common location for testing. | |
Re: [url]http://msdn.microsoft.com/en-us/library/w70c655a.aspx[/url] [code] Indicates that another user control, page source file, or arbitrary file located at some virtual path should be dynamically compiled and linked against the current ASP.NET file (Web page, user control, or master page) in which this directive is declared. [/code] Just like you use "using ...." so … | |
Re: [code=c#] result = m_dbHandler.SmartGetDataSet(sqlCommand); [/code] That line must be handling an exception and returning a null. You need to check if (result == null) then the operation was not sucessful. [code=c#] if (result == null) Response.Redirect("~/error.aspx"); [/code] | |
Re: [url]http://www.zytrax.com/books/dns/ch7/queries.html[/url] Search for "forwarder" | |
Re: [QUOTE=crunchie;806487]If the blocks have been put on by the owners of the Hostel, then we would be breaking their rules by helping you. [/QUOTE] agreed | |
Re: Take a look at string.Contains() or string.Compare() instead of string.Equals(). You will also need to address the casing of the word (uppercase, lowercase). | |
Re: Why not use TStringList.LoadFromFile() ? Also I don't know what effect writing a text file has after you read the line, are you trying to duplicate the lines of the file? Try commenting out your WriteLn() call and doing something else with the read-in string. | |
Re: System.Net.HttpWebRequest Also see: [url]http://www.codeproject.com/KB/cs/Browsing_the_WEB_with_C_.aspx[/url] | |
Re: Isnt there a ShortTimeFormat global variable that defaults to the regional settings on the executing machine which you can then use or override? | |
Re: Look at: [url]http://www.daniweb.com/forums/thread176597.html[/url] It has an example of converting the contents of the file to integers based on line number. You can use that concept to test each line for the respective data type. | |
Re: You should google "C# GETOPT" and "C# GETOPTS", those will return robust solutions for handling parameters in your C# applications. | |
Re: That code doesn't make sense to me... What are you trying to accomplish and more often than not people use the Ident_current to guess the next record id, but if two people retrieve the ident current then they both post data... one of them will have the wrong identity. Also … | |
Re: Quote from [url]http://www.akadia.com/services/dotnet_delegates_and_events.html[/url] : A delegate in C# is similar to a function pointer in C or C++. Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate object. The delegate object can then be passed to code which can call the referenced method, … | |
Re: For a single record I do not think that the SQL Server Version and hardware explain the difference entirely. Indexes become fragmented over time and need to be rebuilt. When was the last time you have ran any form of database maintenance on it? Also there are online ways to … | |
Re: 1. program.cs contains the main entry point for the application and segregates and provides a code file for all application related code, such as handling unhandled exceptions or initializing certain classes before the "main" form loads. This is in no way related to the forms as you mentioned. 2. yes, … | |
Re: This should work: [code=sql] Select u.id, j.uid, u.name, j.cid, c.name, (Select Count(*) From d where d.id=j.id) as cnt From u inner join j on (u.id=j.id) inner join c on (c.id=j.id) [/code] | |
Re: Initializing the variables is not necessary in this case following the logic you are using. Set the values of m1 and m2 in the default: case of your switch statement and the problem will be solved. There is no reason to initialize a variable if you are setting the values … | |
Re: [QUOTE=freshfitz;813098]I believe to authenticate for spam by using a dual look-up, IP to name and name to IP. I know aol will reject if it's not setup by your isp[/QUOTE] Some ISPs check reverse DNS just as freshfitz states. The advantage is most spam is sent from infected machines on … | |
Re: This is the exact reason you should be using parameterized SQL so regardless of the date format this would not be an issue. See [url]http://www.daniweb.com/forums/post811239-3.html[/url] for an example. But to answer your question -- I have looked around myself and can't see a single setting where this would be changed … | |
Re: The most efficient way would be to use the hard coded names of the text boxes [code=c#] if ((!string.IsNullOrEmpty(textEdit1.Text)) && (!string.IsNullOrEmpty(textEdit2.Text)) && (!string.IsNullOrEmpty(textEdit3.Text)) { //do work } { //else error } [/code] However you will likely want to flash an informative error message or focus the text box that has … | |
Re: What are you trying to accomplish? A schema is somewhat an abstract term. For presentation purposes it probably means tables, fields, and relationships. As Ramy mentioned it could also be more comprehensive than that. | |
Re: There is sample code published in: [url]http://www.daniweb.com/forums/thread176597.html[/url] which demonstrates how to read the values at lines 1, 2, and 3 in a file. That can be extended to 9 lines. | |
Re: This illustrates having each method (also called a procedure or function in other languages) having a single task that way you can call the code from anywhere (eliminating the need for a goto). If this doesn't address how you can solve your problem then you need to post the code … | |
Re: Also try to hit \\computer\c$ , where c is the letter of the local harddrive. I have seen instances where the default share won't work, but the drive will. The drive shares (c$) won't show up under the computer's list. While this doesn't solve your problem it gives you a … | |
Re: First off why not use the description attribute provided in System.ComponentModel? It doesn't make sense to create an attribute for something that already exists: [url]http://www.codeproject.com/KB/cs/enumwithdescription.aspx[/url] Second can't you handle the RowDataBound event to substitute the text? See [url]http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx[/url] Since you use reflection to get the description from the enumeration member … | |
Re: If the numbers of 0's can increase that means the length of the string can increase, which lends itself to mean the number of ones can increase. Are you wanting to represent a string based on the position of the characters set to 1? f.eg: ### Will represents the numbers … | |
Re: Use [code=c#] Enum.GetValues(Carpet)[position]; [/code] [url]http://msdn.microsoft.com/en-us/library/system.enum.getvalues.aspx[/url] That will provide you with a list of enumeration members, ordinal position, and you can get the integer value. | |
Re: I think he crosses 3 forums with this question since he didn't ask a specific question (c#, asp.net, sql). BUT since you have the mechanism down to execute a query, I don't think its c#. Since you have the page designed, I don't think its asp.net. That leaves SQL (and … | |
Re: [url]http://www.daniweb.com/forums/thread176030.html[/url] -- "switch problem" [url]http://www.daniweb.com/forums/thread177858.html[/url] -- "case statement not working" [url]http://www.daniweb.com/forums/thread177818.html[/url] -- "case statement default" [url]http://www.daniweb.com/forums/thread177436.html[/url] -- "Unknown Error" You need to consolodate your threads. In the 4 threads you have 2 problems, one with a switch, one with reading the value from a combo box. |
The End.