2,245 Posted Topics
Re: Yes but this is the wrong forum for C# questions, this is the SQL forum :) Please use the C# forum in the future but don't open a new thread for this question, it will be moved shortly! To answer your question -- you don't want to do whatever you're … | |
Re: You may want to use date tables and join your existing data table. I have a similar application where I do the exact same thing and I could not round the dates because I required a record every 15 minutes and couldn't have missing records due to missing data. If … | |
Re: What are you trying to do exactly? Are you just trying to get all of the technologies to play nicely or do you have a goal? The concept of a single machine has been abstracted away with VMs so do you want them running on a single environment, ie both … | |
Re: This is a common problem and you can override it. What version of MSSQL are you using? Here is a query which restores the .mdf and .ldf from the .bak file. [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 … | |
Re: No -- no long code samples for this. I [b]hate[/b] the .NET datasets for the most parts. How they handle nulls (and concurrency) really irks me. When you configure your table adapter one of the options under the "Advanced" button is "Use Optimistic Concurrency" you can turn that off to … | |
Re: Welcome to web development! Keep refactoring your code until you can support every browser :) | |
Re: Post the actual error message so we can tell what is going wrong. I suspect that you have two methods declare as [icode]public static void Main()[/icode]. You can only have one static "Main" in an application. That is the entry point. | |
Re: Define your class as public: [icode]public class string_split[/icode]. Also do both classes reside in the same namespace? [icode]namespace my_project[/icode]? If not you will need to add a [icode]using my_project;[/icode] directive at the top of your class to see the other definition | |
Re: Make yourself a little mouse value structure: [code=csharp] public struct MouseInfo { private int _ctrlStatus; private bool _left; private bool _middle; private bool _right; private bool _leftAndRight; public int ControlStatus { get { return _ctrlStatus; } } public bool Left { get { return _left; } } public bool Right … | |
Re: Embed the file as a resource. Believe it or not this is common outside of malware. Expand the Properties folder in your solution explorer and double click on "Resources.resx" At the top click "Add Resource" and select existing file. In this case I am adding a file called "File1.exe" Now … | |
Re: Can you tell me the bigger scheme of the design for your project? If you have each panel have a timer it will create a thread for every timer instance and if you have more than say 8 instances of the panel thus 8+ threads running you're going to murder … | |
Re: Are the machines set to use your domain controller as a DNS server? Windows resolution sometimes uses WINS or other LAN broadcast information to resolve machine names which could break over a VPN. Also are the MTU settings on your routers all identical and are the domain names rather short … | |
Re: It looks like that machine has IPv6 enabled and you're pulling back the v6 format. You need to check IP Addresses to make sure they are IPv4. IPv4: 10.2.1.3 IPv6: 3ffe:401d:2042::1 Example: [code=csharp] try { string hostIP = @"3ffe:401d:2042::1"; IPAddress ipAddr = IPAddress.Parse(hostIP); Uri address = new Uri(string.Format("http://{0}:8000/calculator", hostIP)); } … | |
Re: Have you tried to reinstall VS? Also look around in your windows event log or other places for more descriptive errors than the one you provided. | |
Re: Why don't you use the IDE and generate a typed dataset? You're making a mess of code there. | |
Re: Are you talking about a server-side update of the database or a client-side refresh of the page when it has been sitting idle for an hour? | |
Re: You solved it before I had a chance to read it :( Maybe next time! | |
Re: By name the product dynamically what do you mean? The "Product Name" code in the installer project's properties? I have some ideas on what can be done. Do you want to maintain the same application and version GUIDs as well? That is very important to the installation process. | |
Re: It depends how the VPN is configured and what clients you use. Say your home IP is 192.168.1.5 and you VPN in to work and their network space is 10.1.1.0/255.255.255.0 and the VPN client adds a route to your routing table [b]just[/b] for the VPN address space. In this case … | |
Re: If the column is a DateTime then it will raise an error if the value could not be parsed. SQL already has data checking constraints. | |
Re: Why not just move it over as a constant? I don't think the value set in your configuration is the final word in determining upload size however. IIS can inherit settings from machine-wide policies, override parent directories, etc. So I think there is probably an API call you should be … | |
Re: You could also use a "form entry point" to return a value. Caller: [code=csharp] 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 struct SearchValues { public string ref_no { get; set; } public string name { get; set; … | |
Re: You need to capture the error message. In your Global.asax file do something like this: [code=csharp] protected void Application_Error(object sender, EventArgs e) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); Exception ex = Server.GetLastError(); while (ex != null) { sb.AppendLine("Message: " + ex.Message); sb.AppendLine("Source: " + ex.Source); sb.AppendLine("Stack: " + Environment.NewLine + … | |
Re: Take a look at /var/log for messages that occur shortly before the shutdown. That usually gives you a good indicator. | |
Re: Put a static timer field in the class and when the form is created set the static reference to the instance reference .. they will have the same reference but that way you can see it from a static method. [code=csharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using … | |
Re: What is an attribute in MSSQL? Are you sure you're asking in the right forum? | |
Re: 1-when it is really impossible to work in a program without a delegate (please give a simple example)? >> Never really. Delegates are provided for convenience of calling. For example the Button's Click event is defined in the .NET Framework and by using a delegate any assembly that uses the … | |
Re: So what is the problem? | |
Re: I guess you want all of the connected drive letters? You will also want to make sure they are accessible: [code=vb.net] Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim drives As System.IO.DriveInfo() = System.IO.DriveInfo.GetDrives() For Each drive In drives Console.WriteLine(drive.RootDirectory.FullName) Next End Sub [/code] | |
Re: What you should do is have one application that tracks all of the other applications. If you only intend to run it locally then you could search off the process name "myApp.exe" as that will be reliable enough. When the "time keeper" application starts up none of the ".exe" names … | |
Re: You can use a UNC or mapped drive letter just like your local C:\ hard drive. | |
Re: Someone ported GetOpts over to .NET. Google around for it. It has some extensive parameter support. | |
Re: You need to use properties and you can. Here is an example class: [code=csharp] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; namespace daniweb { public class SomeClass : INotifyPropertyChanging, INotifyPropertyChanged { private string _name; private int _weight; public string Name { get { return _name; } set … | |
Re: You can set "UseSpecificVersion" = false in your projects reference so it should load any available version of the assembly. | |
Re: [code=vb.net] Imports System.Data Imports System.Data.Sql Imports System.Data.SqlClient Imports System.Data.SqlTypes Public Class frmRestore Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connStr As String = "Data Source=apex2006sql;Initial Catalog=master;Integrated Security=True;" Dim query As String = "RESTORE DATABASE [ServMan] FROM DISK = N'K:\Volume3\BackupSqlDbo\ServMan_backup_200908302125.bak' WITH FILE = 1, MOVE … | |
Re: Why don't you just use rsync? This is a significant undertaking when the wheel has already been invented. | |
Re: I compiled it fine after I set up to allow unsafe: [code=csharp] using System.Drawing; using System.Drawing.Imaging; namespace daniweb { class PixelSearcher { public static Point PixelSearch(Rectangle rect, int PixelColor, int Shade_Variation) { Color Pixel_Color = Color.FromArgb(PixelColor); Point Pixel_Coords = new Point(-1, -1); Bitmap RegionIn_Bitmap = CaptureScreenRegion(rect); BitmapData RegionIn_BitmapData = RegionIn_Bitmap.LockBits(new … | |
Re: [code=csharp] byte[] buffer = new byte[10]; System.IO.File.WriteAllBytes("C:\file.txt", buffer); [/code] | |
Re: Use parameterized SQL. [url]http://www.google.com/search?hl=en&source=hp&q=vb.net+parameterized+query&aq=f&oq=&aqi=g5[/url] After you have switched it over to a parameterized statement then post it back here and let us know what database you are using | |
Re: You will probably want to create a user control then. If you add too many individual controls to a form you kill the performance. But in the case of a user control you would be adding a single container control, which has multiple child controls. Windows can manage this more … | |
Re: I was looking for a way to do that as well some time back and couldn't find it. From what I remember the installer doesn't give you an event or mechanism to get at that configuration setting. If you do a find a way then please let me know :) | |
Re: Its handy if you want to pass data to other pages, especially when you want it retained in the browser's history. If you POST search terms to google for example then you wouldn't have a list of all searches you performed in your browser history. | |
Re: You need to re-run the query to refresh the data from the database so the changes update your gridview. If you're using a DataSet with table adapters you should call .Fill(dataSet) after the second form closes if data entry occured. | |
Re: That looks like my code.... Where did you get it from? Anyways yes you did miss something. In your case you're initializing the username and password to null which will fail authentication with the server so you should just use the default credentials. By the way -- You should [b]never[/b] … | |
Re: You should post your resume in the business exchange forums: [url]http://www.daniweb.com/forums/forum52.html[/url] This forum is dedicated to ASP.NET Q&A. | |
Re: [url]http://en.csharp-online.net/Working_with_Data%E2%80%94Connecting_to_Access_using_OLE_DB[/url] | |
Re: Where does it fail in the boot process and what type of drive is it? IDE, SATA, etc. Do you see the BIOS splash screen? If so can you go in the BIOS and auto detect your HDDs and see if it shows up. If it shows up do you … | |
The End.