2,245 Posted Topics
Re: Here is a class called "Excel Searcher": [code=csharp] using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.IO; namespace daniweb { public struct ExcelSearchResult { public int Row { get; set; } public int Col { get; set; } public string SheetName { get; set; } public ExcelSearchResult(int Row, int … | |
Re: Does this need to be done on-demand or on an interval? You could wrap a service that runs with elevated privelages or schedule a batch file in the task scheduler that runs as admin. If this needs to be done on-demand then it is another issue. Also please explain what … | |
Re: Welcome to daniweb! Please use code tags when posting code on daniweb: This line of code is your problem: string CmdText = "select [First Name] & '' & [Middle Name] & ' ' & [Last Name] as [Name], [Business Street] & [Business City] as [Address], [E-mail Address] as [Email Id],Categories … | |
Re: In your solution explorer expand the project -- then expand properties -- then double click "Resources.resx". When the form comes up in the IDE click on "Add New Resource" in the top center and select "Existing File". It will then let you select a file. You cannot delete an embedded … | |
Re: [QUOTE=GeekByChoiCe;967177]ok stupid question: did u set a password for user sa? i think it have a password by default.[/QUOTE] Also the 'sa' account can be enabled/disabled. Make sure you have the proper password and the account has been enabled. | |
Re: Why not just use a typed dataset to run the update for you? You had a dataset in the project. Also [b]never[/b] call [icode]GC.Collect()[/icode] from code. It doesn't do what you want, ever, and you will suffer a performance penalty anyways. | |
Re: Are you using a POP account now ? What is your current email address (don't paste the full email, just @yahoo.com or whatever the domain is), how are you connecting to it -- ie webmail, exchange, outlook, etc? And what connection method are you using? | |
Re: Dispose the form and re-instantiate it to the state defined by the contructor(s). However I am almost certain this is [b]not[/b] what you want so please clarify what you are doing, and what you would like to do. | |
Re: Why don't you post your code and indicate where you are having issues with functionality? | |
Re: Why are you attempting to store binary in a string? Use a byte[] array and what are the classes you're using. Also please post these question to the ASP.NET forum in the future :) | |
Re: You need to wrap the search terms in %'s -- that is the MSSQL wild care. [code=csharp] sqlcmd.Parameters.Add(new SqlParameter("@p1", SqlDbType.VarChar)).Value = "%" + billBoardNumber.Text + "%"; [/code] | |
Re: Do you have access to execute the stored procedure and are you referencing the same procedure? Make the call to [icode]exec dbo.SomeProcedureName[/icode] to ensure you're calling the dbo's version of it. Other than that -- I have no idea. You didn't explain your problem very well :( | |
Re: Please upload a sample project demonstrating this behavior | |
Re: Subscribe to every delegate available. This topic was discussed in depth on a previous thread: [URL="http://www.daniweb.com/forums/thread206723.html"]Getting EventInfo about fired event in the event handler code [/URL] | |
Re: You do realize that your name is included in that file name and it is very likely you could be found googling your name? I hope this isn't against your class' policy. Anyway don't worry about appending a file and seeking it etc etc, that is too much of a … | |
I was trying to run down an old post where I remembered posting code to answer a question that was asked so I searched for the site on google: [url]http://www.google.com/search?hl=en&q=site%3Adaniweb.com+knake+excel&aq=f&oq=&aqi=[/url] I think the third thread was this: [url]http://www.daniweb.com/forums/thread196171.html[/url] Notice my post with code. Click toggle plain view and you will … | |
Re: [code=csharp] System.Math.Sqrt(); [/code] | |
Re: Its hard to tell. You didn't include enough of the project to compile (missing DataDictionary) but you did include your subversion files :) | |
Re: [code=sql] Update imgTable Set ImageColumn = null [/code] That will change all of the images in the database to null. | |
Re: You need to change the DataAdapter's update, delete, insert, and select queries and add another parameter for the new field. This is probably not a good idea. Let me ask you this -- are you using a typed dataset or one created in code? | |
Re: [code=csharp] public static bool IsValidEmailAddr(string email) { try { System.Net.Mail.MailAddress addr = new System.Net.Mail.MailAddress(email); } catch { return false; } return true; } [/code] | |
Re: [code=csharp] private void button4_Click(object sender, EventArgs e) { string tempPassword = Guid.NewGuid().ToString().Split(new char[] { '-' })[0]; } [/code] | |
Re: What type of array and how do you want to store it? If you have an integer array you could get away with storing the values in CSV without a text qualifier: [code=vb.net] Public Class frmArray Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim lst … | |
Re: Why aren't you able to write it? You don't know where to put it or you're getting file system errors .... ? | |
Re: What have you tried so far? And you are referring to the ASP.NET repeater, correct? This question belongs in the ASP.NET forum. Show us what you have so far and we can work from there. | |
This generates a random number string. I needed to post this code to link to it :P | |
This is a query aggregator that stacks up queries and parameters until you hit the hard limit of 2010 set by the SQL Server/Driver, or you call .RunQuery() Scott Knake [URL="http://www.apexsoftware.com"]Custom Software[/URL] Apex Software | |
Re: >> by investigating the project i try to understand the references as to how they were added, as project or as dll Its the same thing. The "SpecificVersion" doesn't appear in your referenced projects because it knows the version since it is part of the solution and compiled with your … | |
Re: The [icode]ArrayList[/icode] class is also marked as serializeable. [code=csharp] private void Serial() { ArrayList itemList = new ArrayList(); itemList.Add("john"); itemList.Add("smith"); XmlSerializer serializer = new XmlSerializer(typeof(ArrayList)); using (FileStream fs = new FileStream(@"C:\fileName.xml", FileMode.Create)) { serializer.Serialize(fs, itemList); } } private void Deserial() { ArrayList itemList; XmlSerializer serializer = new XmlSerializer(typeof(ArrayList)); using (FileStream … | |
Re: Dan08, Take a look at /var/log/auth.log /var/log/messages and /var/log/syslog. It sounds like this is related to an authentication issue. Perhaps that application is trying to run [icode]su[/icode] instead of [icode]sudo[/icode]? | |
Re: What is the problem here then? You can't find how to connect to your sql2000 server OR the application is making a connection but to the wrong sql server? | |
Re: What is the error message that you receive? You should not send email in response to a user's action. You should queue it and have a service process the queue every minute and send out the emails. | |
Re: Welcome to Daniweb Micka10! Please use code tags when posting code: [noparse] [code=csharp] ...code here.... [/code] [/noparse] To answer your question -- You need to disable optimisitic concurrency in the tableAdapter's configuration. When you configure the table adapter you will find an "Advanced" button, click on it and uncheck the … | |
Re: Where does the code that calls the database reside? If you're using a [icode]DataSet[/icode] the designer defaults the [icode].Fill()[/icode] call in your form's load event. You need to run the code to assign the text *after* you load the data from SQL. Your code to call the sql server should … | |
Re: Is the rec_id unique? If so there is another way to go about this. Here is one way: [code=sql] IF OBJECT_ID('TestTable') IS NOT NULL DROP TABLE TestTable Create Table TestTable ( set_id int, rec_id int ) Insert Into TestTable (set_id, rec_id) Values(10, 1) Insert Into TestTable (set_id, rec_id) Values(10, 25) … | |
Re: [code=vb.net] Dim query As String = "Select * From someTable Where UserName = '" & theUser.ToString() & "'" [/code] | |
Re: What is your end goal here serkan? Windows packs all of your files in to a .cab and builds the msi. You can unpack an MSI. There are tools for it if you check google. | |
Re: [url]http://www.programmingado.net/a-389/MySQL-NET-parameters-in-query.aspx[/url] | |
Re: Use rsync. It already does this and has more robust command line options. | |
Re: Why don't you post a sample of the data you're working with and what the goal is and we'll go from there. I don't know what to put in the select command without know what the data looks like and what the objective is. | |
Re: Yes you need to define them. Are you using a typed dataset or an in memory data table/dataset? | |
Re: Do you want to connect to a central server and don't want to install sql express because they aren't hosting the database, or do you want to ship a database with the application but not require sql express? | |
Re: Welcome to daniweb TotallyBroke! Please use code tags when posting code You probably need call `Invalidate()` and `Repaint()` or `Refresh()` on the form. If you the screen but don't invalidate the region and repaint it -- then your screen shot will look like what it did before you set the … | |
Re: Highlight the file in windows explorer and press the delete key. Does it give you an error? Or does it re-appear after you reboot? | |
Re: You can specify the file names to restore to: [code=sql] RESTORE DATABASE [ServMan] FROM DISK = N'K:\Volume3\BackupSqlDbo\ServManNew_backup_200908302125.bak' WITH FILE = 1, MOVE N'ServManNew' TO N'D:\Microsoft SQL Server\Data\ServMan.mdf', MOVE N'ServManNew_log' TO N'D:\Microsoft SQL Server\Data\ServMan_log.ldf', NOUNLOAD, REPLACE, STATS = 10 [/code] Notice I am restoring from "ServManNew.bak" to the database "ServMan". I … | |
Re: It looks like you can just run it as-is. Have you tried? | |
Re: Can you post some sample data? By what you have said I am under the impression that "h1n2c3n5" should return the result of 1+2+3+5 which equals 11? Is that correct? This udf will strip out all non-numerics for you which you can safely convert: [code=sql] if object_id('dbo.fn_StripNonNumeric') is not null … | |
Re: Why don't you call [icode]File.WriteAllBytes(@"C:\test.mp3", bindata);[/icode]? Also use your debugger and see if you actually have data inside of the byte array. |
The End.