2,245 Posted Topics

Member Avatar for sonia sardana

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.

Member Avatar for sknake
0
120
Member Avatar for serkan sendur
Member Avatar for serkan sendur
0
112
Member Avatar for dfswart

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

Member Avatar for serkan sendur
0
114
Member Avatar for ariez88

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 …

Member Avatar for sknake
0
1K
Member Avatar for redburn

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 …

Member Avatar for redburn
0
280
Member Avatar for lolwtf

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]

Member Avatar for lolwtf
0
134
Member Avatar for gingank

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?

Member Avatar for sknake
0
131
Member Avatar for nokomoli

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

Member Avatar for sknake
0
126
Member Avatar for nlvraghavendra

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

Member Avatar for sknake
0
91
Member Avatar for jen140

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

Member Avatar for sknake
0
63
Member Avatar for MiketheBook

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 …

Member Avatar for gerbil
0
240
Member Avatar for serkan sendur

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

Member Avatar for sknake
0
150
Member Avatar for serkan sendur

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

Member Avatar for sknake
0
114
Member Avatar for history84084

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.

Member Avatar for sknake
0
93
Member Avatar for sonia sardana

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

Member Avatar for sonia sardana
0
146
Member Avatar for asw.asela

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

Member Avatar for asw.asela
0
111
Member Avatar for Squinene

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 …

Member Avatar for sknake
0
122
Member Avatar for vijay_gurav
Member Avatar for sknake
0
35
Member Avatar for sebaz

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

Member Avatar for sknake
0
113
Member Avatar for krokodajl

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 …

Member Avatar for sknake
0
88
Member Avatar for nlvraghavendra

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 …

Member Avatar for sknake
0
95
Member Avatar for mr_scooby

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 …

Member Avatar for ddanbe
0
107
Member Avatar for scholar

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

Member Avatar for sknake
0
215
Member Avatar for scholar

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

Member Avatar for ddanbe
0
313
Member Avatar for saika

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]

Member Avatar for sknake
0
341
Member Avatar for serkan sendur

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]

Member Avatar for serkan sendur
0
742
Member Avatar for roschc

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.

Member Avatar for NextCom
0
136
Member Avatar for edojan

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.

Member Avatar for sknake
0
68
Member Avatar for jktsavla

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 …

Member Avatar for jktsavla
0
199
Member Avatar for sonia sardana

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 …

Member Avatar for sknake
0
136
Member Avatar for S2009

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 …

Member Avatar for S2009
0
1K
Member Avatar for srikanthkadem

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 …

Member Avatar for IdanS
0
354
Member Avatar for chriscross86

You must not have this defined in your configuration file: [code=vb.net] ConfigurationManager.ConnectionStrings("CourierSystemConnectionString") [/code]

Member Avatar for nicky.23in
0
188
Member Avatar for abhay_pundir

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?

Member Avatar for Ramy Mahrous
0
111
Member Avatar for rak4u

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 …

Member Avatar for sknake
0
152
Member Avatar for babbu
Member Avatar for serkan sendur

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

Member Avatar for serkan sendur
0
2K
Member Avatar for mansi sharma

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]

Member Avatar for mansi sharma
0
89
Member Avatar for jogisarge

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 …

Member Avatar for Ramy Mahrous
0
149
Member Avatar for Siberian

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

Member Avatar for Siberian
0
82
Member Avatar for ankushbansal89

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.

Member Avatar for sknake
0
85
Member Avatar for Tank50

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 …

Member Avatar for sknake
0
154
Member Avatar for TobbeK

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

Member Avatar for TobbeK
0
95
Member Avatar for papanyquiL

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 …

Member Avatar for papanyquiL
0
162
Member Avatar for audigy642

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 …

Member Avatar for sknake
0
139
Member Avatar for mansour77

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 …

Member Avatar for mansour77
0
88
Member Avatar for rbemiller

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 …

Member Avatar for sknake
0
434
Member Avatar for speranza

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 …

Member Avatar for dnanetwork
0
94
Member Avatar for cVz

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#] …

Member Avatar for dnanetwork
0
2K
Member Avatar for VinayRok
Member Avatar for dnanetwork
0
112

The End.