2,245 Posted Topics
Re: Out of curiosity why don't you use a database for this? Using text/flat files is archaic and error and prone. You will need to rewrite the text file. If your parser ever blows up while adding a transaction or modifying inventory you stand to lose all of your data. | |
Re: When/Where are you looking to set the values, ie at what point of the installation? | |
Re: [QUOTE=dfswart;906453]I would like to format it before I send it to Webservice. The problem I have is not the Webservice but how to chage the color in C#.[/QUOTE] Would you like to format it using inline markup in HTML/XHTML? Or possibly CSS? What about Rich Text? It could also be … | |
Re: This is the C#.NET forum for windows form applications not ASP.NET, that is another forum: [url]http://www.daniweb.com/forums/forum18.html[/url] Here is some code I mocked up for a form application but the concepts are the same in ASP.NET except for calling the textbox's focus. I believe there is a LoginControl template page or … | |
Re: I do the same thing and have the same problem. What I do is use a prefix on filenames in the %TEMP% directory and when ever I go to create a new file i try to delete the existing ones. If it is in use then it skips it.. when … | |
Re: You should be able to set a format string for the column in the grid. Here are the formats you can define: [url]http://msdn.microsoft.com/en-us/library/az4se3k1.aspx[/url] | |
Re: It looks like that is tied in to some sort of authentication as adatapost indicated. LDAP is directory authentication protocol. Can you post more code? | |
Re: [code=sql] /* Column A | Column B 1 a 1 b 2 c 2 d */ IF OBJECT_ID('Table1', 'U') IS NOT NULL DROP TABLE Table1 Create Table Table1 ( ColumnA int, ColumnB varchar(1) ) GO Insert Into Table1 (ColumnA, ColumnB) Values (1, 'a') Insert Into Table1 (ColumnA, ColumnB) Values (1, … | |
Re: [url]http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/ca47c7a9-226d-412d-8390-041edc154636[/url] [url]http://www.eggheadcafe.com/forumarchives/Sharepointwindowsservicesdevelopment/Nov2005/post24300867.asp[/url] [url]http://www.schaeflein.net/blog/2004/03/29/OrderOfEventsInWebPart.aspx[/url] | |
Re: You should drop a "contextMenuStrip" on to the form. You can click on it and add items in the designer. Also click on the listbox and assign the "ContextMenu" property to the new context menu strip you dropped on the form | |
Re: I'm pretty sure that Windows 2000/XP doesn't have support for a lot of the newer hardware so that doesn't surprise me. I would recommend contacting the vendor where you purchase the laptop and ask them the steps for doing a recovery. Usually dell, hp, etc. has utilities online or on … | |
Re: Why does it matter? You can call the win32 ShellExecute() or C# Process.Start() with parameters the same way you can on the command line or from the run dialog box. It just fires up the installer... | |
Re: No, they do the same thing. When you execute an application from a command prompt it starts a process... the same with double clicking on it. Why does it matter? It does matter if its a console application but that is a different story.. | |
Re: Here is an example of how I do this in one of my applications. I have a "comm" window that talks to network appliances and I log debug output from various facets of the app. | |
Re: [code=c#] using System; using System.IO; using System.Windows.Forms; namespace daniweb { public partial class frmReadLine : Form { public frmReadLine() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { const string fName = @"C:\file.txt"; using (StreamReader sr = new StreamReader(fName)) { string curLine, prevLine = null; while ((curLine = sr.ReadLine()) … | |
Re: Also I posted a code sinppet and answered a similar question earlier today. If you mean log in to your application (not windows) then see the posts: Please see the thread: [url]http://www.daniweb.com/forums/thread200922.html[/url] or code snippet: [url]http://www.daniweb.com/code/snippet1244.html[/url] If you're trying to rewrite the windows login screen then I cannot help you. … | |
Re: Personally I don't think you have done anything all that bad [b]however[/b] it is up to your boss to decide what information is sensitive or not. If he says the addresses are sensitive and wants to reprimand or terminate you -- then the only avenue for recourse would be legal … | |
Re: Why don't you post the code you have so far and we'll build on it from there? | |
Re: [code=sql] IF OBJECT_ID('Table1', 'U') IS NOT NULL DROP TABLE Table1 Create Table Table1 ( Fish varchar(1) ) IF OBJECT_ID('Table2', 'U') IS NOT NULL DROP TABLE Table2 Create Table Table2 ( Fish varchar(1) ) GO Insert Into Table1 (Fish) Values ('A') Insert Into Table1 (Fish) Values ('B') Insert Into Table1 (Fish) … | |
Re: Unless you're threading the calls to the database then the application's main thread will be unresponsive while a database call is being performed. Basically: "your application will lock up until the database call is complete". Are you wanting to show a progress form while DB I/O is taking place? I … | |
Re: You can't very well do that with an embedded resource file. You should add a localization file similar to the resource file that ships plaintext as an .XML file with your assembly. From there you can make a data entry screen to edit the data. I would approach this by … | |
Re: Add a new class named RecordInfo to your project: [code=c#] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace daniweb { public class RecordInfo { public DateTime DriveDate { get; set; } public decimal Distance { get; set; } public int Time { get; set; } } } [/code] Then … | |
Re: I use a custom tab control and hide the tab headers during run time that way you can easily click on the tabs during design time to change the control layout: [code=c#] using System; using System.ComponentModel; using System.Windows.Forms; namespace DataExplorer { public class TabControlEx : TabControl { /// <summary> /// … | |
Re: I think you just need to change the [icode]ShowMessage()[/icode] to show the .Name property instead of .Text, try this: [code=c#] foreach (string s1 in s2) { newlabel = new Label(); newlabel.AutoSize = true; newlabel.Text = s1; newlabel.Location = new System.Drawing.Point(50, 20+30*i); newlabel.Name = s1; newlabel.Size=new System.Drawing.Size(60,25); newlabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; groupBox1.Controls.Add(newlabel); … | |
Re: I use atalasoft for my OCR projects. They were the cheapest company I found at the time but I was looking for a royalty free license, not necessarily the cheapest license per workstation. [url]http://www.atalasoft.com/products/dotimage/ocr/default.aspx[/url] | |
Re: Check these our serkan: [url]http://vbcity.com/forums/topic.asp?tid=86291[/url] [url]http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_24013445.html[/url] | |
Re: You can't. Use a naming convention such as "Cust*" for all the custom tables, "Inv*" for invoice tables. It will group them by name but that is about as good as it gets. | |
Re: I think this is beyond the capability of a shell script. You can use the w32 handle to find those windows and programmatically press the "Yes" key. I don't know of any scripted languages capable of this but VBA probably is. | |
Re: If you embed a quote in a string you need to escape it or use "", I think you are asking how to get a string representation of the HTML? [code=c#] string s = @"<ul id=""dhtmlgoodies_tree2"" class=""dhtmlgoodies_tree""><li id=""1"" > <%=Ajax.ActionLink(""ATI Display Driver"", ""Test/5"",new AjaxOptions(){UpdateTargetId=""returnData""}) %>"; [/code] The [icode]<% %>[/icode] will … | |
Re: This will create a table named "Test123" [code=vb.net] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim conn As SqlClient.SqlConnection = New SqlClient.SqlConnection("Data Source=APEX2006SQL;Initial Catalog=ServManLeather;Integrated Security=True") conn.Open() Dim cmd As SqlClient.SqlCommand = New SqlClient.SqlCommand("Create Table Test123 ( someColumn varchar(123) )", conn) cmd.ExecuteNonQuery() cmd.Dispose() conn.Close() conn.Dispose() End … | |
Re: Try this: Create trigger trg_InsertInBookIssuedDetails on BOOKISSUEDDETAILS for insert as begin declare @UserName nvarchar(50), @BookID int, @ReturnMessage nvarchar(50) begin try begin tran select @UserName = IssuedTo,@BookID = BookID from BOOKISSUEDDETAILS update NewUserRegister set NumberOfBooksIssued = NumberOfBooksIssued+1 where UserName = @UserName if (select Inventory from LIBRARYBOOKDETAILS WHERE BookID = @BookID)>1 begin … | |
Re: That is a very interesting find..... and I cannot explain why it is isn't throwing the object disposed exception. It seems SqlCommand doesn't implement IDisposable but DBCommand does, and SqlCommand overrides the base Dispose() method. It looks like a bug in the CLR. You can see where it is overriden … | |
Re: You must not have this defined in your configuration file: [code=vb.net] ConfigurationManager.ConnectionStrings("CourierSystemConnectionString") [/code] | |
Re: How is this related to C# and where do you see this button? Is it in an application or in windows explorer? Lastly -- Does the directory exist? | |
Re: Just because an index is clustered doesn't necessarily mean it is the best index to use. If you store a large amount of data in the tables, especially if you use varchar(max), text, or image data types, then you should probably create another nonclustered index on the joining identifiers. A … | |
Re: Post your project code so we can take a look. | |
Re: [QUOTE=Diamonddrake;888294]you could create a dummy file, a little text file or something that serves no purpose but to encourage the creation of the folder, but other than that, you might just have to wait for a new version of VS to fix that.[/QUOTE] This is the method I use and … | |
Re: Try this: [code=vb.net] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sID As String = "ABC1" Dim lID As Integer sID = sID.Replace("ABC", String.Empty) lID = CType(sID, Integer) End Sub [/code] | |
Re: I mocked up your class since you didn't post a definition, but try this: [code=c#] 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 frmFindControl : Form { private List<ArticlePrice> prices; public frmFindControl() { InitializeComponent(); //initialize the … | |
Re: Open up windows explorer and go to "Tools -- Folder Options" then click on the "File Types" tab. Is this what you meant you were aware of? And if so what more functionality do you want? You can make any necessary changes with this screen... | |
Re: Try putting your log query in [icode]exec('query here')[/icode] and see if that rolls back. I think that may be a work around but I haven't tested it before. | |
Re: I think Ramy has the answer here but I also have this happen randomly when everything has been cleaned up properly -- the issue turned out to be the visual studio hosting process. If you go to your project properties then on the left side click debug, the bottom most … | |
Re: ddanbe and adatapost gave you good advice and I hope you come back with more specific questions. If you're developing an abstract class you tend to have a design in your mind for multiple classes that will inherit from it. In this case "animals" might be better off as "livingBeing" … | |
Re: By comes up blank do you mean that you do not even see the DateTime output in the console window? I ran this as a console application and I see the date time print but not the regular expression since the info and pattern do not match. If that is … | |
Re: I generate my own certificates from the certificate authority installed on the domain controller but this won't work for external clients that do not trust your internal certificate authority as a valid signer. You can purchase an SSL certificate from godaddy with multiple subdomains, i.e. company.com, [url]www.company.com[/url], mail.company.com and that … | |
Re: As ddanbe said, in the case of file it is just a class with File utilities but you cannot create an instance of it. You can use the [icode]System.IO.FileStream[/icode] class for more advanced I/O operations, or you can use [icode]System.IO.FileSystemWatcher[/icode] to watch for modifications of a file on disk. This … | |
Re: Here is a query aggregator class I use to aggregate upserts. A fair amount of time can be wasted if you send updates one at a time but sometimes this isn't practical. [code=c#] using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Text; namespace daniweb { /// <summary> /// This class is … | |
Re: If the UserId is an auto increment column in the users table then you do not specify a parameter. You simply: [code=sql] insert into users (name,surname) values (@name,@surname) [/code] After the insert query you can [code=sql] Select Cast(SCOPE_IDENTITY() as int) As UserId [/code] That will give you the seed value … | |
Re: Try this: [code] <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="daniweb.web.WebForm1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:dropdownlist ID="Dropdownlist1" runat="server"> <asp:ListItem Value="Value1">Text1</asp:ListItem> <asp:ListItem Value="Value2">Text2</asp:ListItem> </asp:dropdownlist> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </div> </form> </body> </html> [/code] [code=c#] … | |
Re: Unfortunately that is a lot of code that we can't compile. Can you upload a sample project with the data embedded? |
The End.