
dakota97
Avatar/Signature-
Posts
116 -
Joined
-
Last visited
dakota97's Achievements
Newbie (1/14)
0
Reputation
-
NeverNLand started following dakota97
-
Hi Al,, I have a query that returns a set of results with 7 records as seen below. What I'm looking to do is to combine those 7 records into one record. The only differences are the values in "Value X" field. http://cgdesign.net/images/sql.jpg Thanks in advance, -Chris
-
As always you've come through again. I went into the file system viewer and set the properties of the configuration files to "Vital = false" and the installer no longer runs each time. Once again, thank you. -Chris
-
Hi all, It's been a while since I've posted here, but I haven't forgotten all of you, and I'm back with another strange issue. I'm using VS2008 and I've created a standard deployment project for my app. I've created a custom installer class to override the standard one simply to delete a configuration file based on the user's selection during the install. This way I can have one package to deploy both version of the program, and the user selection determines which version is installed. Simple enough right? The problem is that each time the application is started, the Windows Installer appears and "re-installs" the application. This in turn puts both configuration files back in the application directory. It appears that my customer installer is run during this process, but since there is no selection, it doesn't delete either of the 2 files. So, in short, why is the installer running each time the application is started? Any ideas would be greatly appreciated. My code for the custom installer is as follows: public override void Install(IDictionary stateSaver) { string installedVersion = Context.Parameters["Selection"]; string installDirectory = Path.GetDirectoryName(Context.Parameters["assemblypath"]); //Delete the appropriate configuration file if (installedVersion == "Standard") { if (File.Exists(installDirectory + "\\Configuration.xml")) File.Delete(installDirectory + "\\Configuration.xml"); } else if (installedVersion == "Network") { if (File.Exists(installDirectory + "\\Config.xml")) File.Delete(installDirectory + "\\Config.xml"); } } Thanks in advance, -Chris
-
Hi all, Is it possible to create a new .jpg file from 2 colors that a user selects in a WinForms app? What I want to do is give the user an option to select 2 colors using a colorpicker. When they click "save", I want to create a new 1px wide by 1050px high gradient style image to be used as a webpage background, and save it so that it can be uploaded to a web server via FTP. The uploading I can handle, but I need to know if there's a way to create the image file. Thanks in advance, -Chris
-
Hi all, I have a database backup application that I wrote that connects to a remote SQL instance and copies all database changes to my local SQL Server instance. Everything is working fine, with one small glitch that does cause a problem if I need to restore the database on the remote server. In short, the app connects to the remote database and retrieves a list off all databases on the server. It then connects to my local server and retrieves the same list. It compares the list and creates the database on the local server if need be. During this process it also creates the tables, and then populates the corresponding records. It does this for each database it finds until all databases have been processed. The problem that I have is that when it creates the tables it doesn't set the identity property for a specific column that is set as the primary key, int, identity, etc. If I use query analyzer to generate a script of the table, I can see that the identity column is indeed specified. However, in my code I use the following line to retrieve the table structure, but it doesn't include an identity property: SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'myTable' Does anyone have an idea on how I can make this happen? It work be really nice if there is a way to programmatically script a table the same way it does in QA, save the script as a text file locally, and then run the script in code when I create the table. Is this possible? Thanks in advance, Chris
-
Well, I finally figured out what is was. I had a second <form> tag on my page that for some reason was resetting the original text value of all textboxes on the page. Anyone have any idea why this happens? I'd really be interested in an explanation.
-
Unless there's something funky going on that I don't know about, the answer is no. That's why it's throwing me off as to what the problems is. Here's my Page_Load code: protected void Page_Load(object sender, EventArgs e) { if (Session["LBSRegistering"] == null) { Session.Add("LBSRegistering", "1"); } //Determine if the user has previously logged in if (Session["LBSUsername"] != null) { txtUsername.Visible = false; txtPassword.Visible = false; Label4.Visible = false; Label3.Text = "Welcome back " + Session["LBSUsername"].ToString() + "!"; btnLogin.Text = "Logout"; } if (!Page.IsPostBack) { //Load the site sponsors LoadSiteSponsors(); //Update the AJAX controls UpdateStats(); UpdateBanner(); UpdateListings(); UpdateEndingSoon(); tmrUpdateBanner.Enabled = true; tmrUpdateListings.Enabled = true; tmrUpdateStats.Enabled = true; ScriptManager1.RegisterAsyncPostBackControl(tmrUpdateStats); ScriptManager1.RegisterAsyncPostBackControl(tmrUpdateBanner); ScriptManager1.RegisterAsyncPostBackControl(tmrUpdateListings); } } None of the update methods do anything with the textboxes either. They simply load data into UpdatePanels from the database. Temporaily I've done a workaround just so I can keep moving forward. I'm doing HTML form-style passing, but I've lost my page validation functionality by doing that which isn't a good thing. Any suggestions? -Chris
-
Hi All, I'm running into a very annoying problem, and cannot for the life of me figure it out. I have 2 web pages that I'm working with in a registration process, Register.aspx and ProcessRegistration.aspx. The first page has 2 textboxes for existing users to login at the top, and a registration form for a new user to fill out. However, when I fill out the registration form and submit it, the page does not keep the form data so that it can be processed. At first I tried processing the data in the click event of the submit button on the Register.aspx page. If the information was correctly processed, then it sent the user to a success page. But, I believe that I was running into a problem with the postback for that page. It is my understanding that what was happening was the page was re-initializing the controls, and that's why the text boxes has no text values. So I tried looking at cross-page posting by sending the data to the ProcessRegistration.aspx page, but am still having no luck. Can anyone give me some advice on how I need to do this? This is a big project for a client, and I'm totally stuck on this, and it's a major part of the application. Any help would be greatly appreciated. Thanks in advance, Chris
-
Web service to copy file on server
dakota97 replied to dakota97's topic in Directory / File IO / Registry
Sorry about not getting back to you sooner. Had a family emergency over the weekend. To give you a little background, I'm creating a web application for a local high school booster club. I've converted all of their existing static HTML pages to ASP.Net using C#. I then wrote a small "updater" application that the user enters the website changes into, which in turn inserts the data into a SQL database. The reason I need 2 copies is because my client wants to be able to preview any changes to the site prior to posting them live. So, I created 2 seperate folders on the web server, one called "portal" and the other "preview". I basically duplicated the site files in both folders, and created the corresponding tables in the database. When changes are made, the data is inserted into the "preview" tables, and once they approve them, the records are then copied into the live database tables, deleted from the preview tables, and published on the site. This method might not be the best, but it was what I came up with given the limited amount of time that I had to complete the project (football season is now started). So, what my thoughts are is to create a webservice that is called from the application after the user uploads a picture to the server. It would then find and copy the original file into the appropriate location, ultimately having 2 copies of the image on 2 different difrectories. Since the web server is obviously more powerful than the local machine, I figured it shouldn't take as much time to copy the file from one directory to another, as opposed to uploading the file via FTP a second time to the second location. Web space isn't a concern, but I figured that after the changes were approved, then I could delete the "preview" image from the directory. Any thoughts? -Chris -
Hi all, It's been a while, but I'm back with another question. This time its dealing with files on my web server. I have an application that uses FTP to transfer files from a local computer to my web server. The file needs to be copied into 2 different directories. The only problem is I don't want to have to upload the file twice through the local application. Is it possible to create a web service on the server that is called from the app that will copy the newly uploaded file from one directory on the server to another? Or, is there some kind of automated task that I can create that will monitor one folder and, if it sees a new file, copy it to the second folder? Any suggestions will be greatly appreciated. Thanks in advance, -Chris
-
Hi All, My current web hosting provider does not allow me to assign a subfolder as an application directory for ASP.Net web apps. I have to contact their tech support and have them set the folder that I specify as a web application folder in IIS from their side. They use H-Sphere as their control panel, but their current version doesn't allow user-side changes like this. They have mentioned to me that I could do this through Visual Studio when I publish the app, but I've never come across anything that gives the option of creating a web application folder during the publish procedure. Is this possible, and if so how? It's an inconvenience to have to get ahold of tech support each time I want to create a different folder, and make sure that it's set correctly so that the web app works. Thanks in advance, Chris
-
Hi all, I'm writing a C# app that will print information from a database. I have a pre-printed form that I need to print on and align the data so that it fits in the pre-defined areas. What is the easiest way to do this? Does anyone possibly have any examples that they can point me to? I really don't want to take out a ruler and manually enter all of the spacing, etc. Any help would be appreciated. Thanks in advance, Chris
-
Hi all, Anytime I've needed answers to questions, you guys haven't failed me yet, so here it goes. I am developing an app that requires a high precision timer. I need something with the resolution that QueryPerformanceCounter provides, but I am finding that Intel SpeedStep, AMD Cool and Quiet, Dual Core, and just bad motherboards are causing QPC to return unexpected delta values. I have seen in a couple of different threads that using /usepmtimer will cause Windows to use the ACPI timer. Is this the best way to go? 1) For what operating systems will the /usepmtimer switch work in boot.ini? (2000? Dependant on XP service pack? Dependant on num CPUs?) 2) Will the /usepmtimer switch work with non-intel CPUs? 3) Does using the /usepmtimer switch mean that QueryPerformanceFrequency will always use the ACPI timer and return 3579545? 4) Is there an API or assembly to read the ACPI timer directly w/o needing to use the /usepmtimer switch? 5) Has anyone ever seen a case where QPF will change? I have tried SpeedSwitch XP and laptops with no A/C attached and can�t get it to do so. 6) Has anyone ever seen a case where QPF doesn�t change but acts as an order of magnitude difference? I have an end user who has a new Dual Core Dell and when they specify 1800 milliseconds for a duration value, it actually acts as 18000 (18 seconds). 7) Will XP SP3 when released fix some of the QPC/QPF anomalies? 8) I am aware there is a hotfix for dual core systems, what does it actually technically do? If anyone can answer any or all of these questions, or point me in the right direction, I would greatly appreciate it. Thanks, Chris
-
Thanks Machaira for the reply, and sample. I had a problem opening the solution file, saying that it was missing 3 files. But, I was able to successfully convert you VB code into C# and get the sample working. The only problem I see (and it was probably my fault for not being more clear in my explanation) is that when drilling down through the tree, it places the "HKEY_LOCAL_MACHINE/Software/E-Prime......." as a string value at the lowest level. What I'm looking to do is parse that string, and build the tree according to the values. I guess a better way to explain it would be I need to retrieve that string from the "RegistryKey" node. Then I need to insert the "HKEY_LOCAL_MACHINE" as the first node in the treeview. Then add the "Software" as a childnode to that...."E-Prime" as a child nose to "Software"...etc. Then, I'll need to grab the next "RegistryKey" value, and do the same, only without duplicating the childnodes. So somehow I need to check and see if the childnode already exists (which I can see that you code does do), and if it does go to the next part of the string. Thanks for the effort, and if that explains it any better, let me know any ideas or suggestions. Thanks, Chris
-
Hi all, I'm having problems building the hierarchy of a treeview control from an XML file. I'm basically looking to replicate the same structure that the Windows registry uses (HKEY_Local_Machine/Software/....etc.), but I can't figure out how to build the tree so that I don't duplicate childnodes. Our tech support team receives XML files with various infomormation retrieved from the end-user's computer. They use this to diagnose hardware compatibility issues with our software, since a lot of it is low-level communication with the hardware. However, it is painstakingly time consuming to read the raw XML that is produced. So, I've been assigned the task of creating a "Support Reader" application that will load the XML file into a "human readable" format. Ultimately, the application will parse the XML file, and create the tree structure. Then when the user clicks on a specific node, the underlying values will be populated in a listbox or listview control, the same way as seen when navigating through the Windows registry. So far, I've been able to insert the top-level nodes (all the HKEY ones), and one childnode, but I'm having major difficulties adding additional nodes below that. The big thing is that if the node exists, I don't want to add it a second time. I've attached the XML file template that I'm using, and would appreciate any pointers or code samples on how I can get this to work. Thanks in advance, Chris machineinfo.zip