Answer Questions
Jean-Francois Peyroux Database connection dilemma
Hi! I have a dilemma concerning connections to databases... Should I open a new connection for each query, OR should I leave the connection open for all queries, and close it at the exit of application I suppose it is a matter of personal taste... The application in question is a client/server application. From that point of view, I think I should open a new connection for each query, but on the other hand, it ...Show All
FernandoAlvarez Objects stored in a hashtable - by reference?
Hi, I'm writing an interpreter in c#. For variables I have a system where I have a class representing a variable: class var { public Hashtable Children; public object Value; } When a variable is declared, I do something like this: var Temp = new var(); Temp.Value = something; VarIndex.Add("variable name",Temp); However I've found adding the Temp ...Show All
sigs007 Need help with the a C# program
For some reason my program will not compute the square feet or square meters. Any idea why this is happening. michelleshockley7@hotmail.com #include <stdio.h> int main() { /* Vaible declarations */ int cv_factor=36*36; /* Conversion factor to convert */ int length_yds; /* Length in yards; input by user */ int width_yds; /* Width in yards; input by user */ int area_in_yards; int area_in_fe ...Show All
Shalini writing value to Registry
Hi all, I have a problem with writing a value to a registry. I want to change the pocket pc registry at run time by my application. On of the keys I want to change is : BDDevClass = 06 05 80 the key value type is REG_BINARY. When I write to this key by the SetValue methode : SetValue("06 06 07") I get in the key the value "06 06 07" (I mean with the "" marks. This is the problem, I want to set the value without the "". How can I do that. Pl ...Show All
Joginder S Nahil Nice Threads!
I could really use some help here... I am using C# 2005 and have created a splash screen that runs on a seperate thread. I can invoke the splash screen in the Main() method, but then I can't get rid of it! I am attempting to put a line in the Form1_Load (or maybe Form1_Shown) that calls a static method in the splash screen to close that form. But, when I do so, it complains about an invalid cross-thread operation. How can I get this screen to ...Show All
J.M. Dussault interacting sql server 2000 and c# .net
hi, i have a number of database tables created through sql server 2000 and i have created an application in c# using visual .net 2003. could anyone teach me how to interact my c# application and sql server 2000 so that i can make a query using my c# application. thanks Hi, You'll need to work on System.Data and System.Data.SqlClient namespaces respectively. http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/ ...Show All
pberkhof Ruler
Hi to of you. I have MDI form with Child form. How can I implement a ruler in the document like the Word Thanks jbattat The framework doesn’t have any built in controls of that sort so your options are to either make your own or use someone elses... try this one from Code Project . With a little work you should be able to integrate it into your app with little difficulty. ...Show All
Shahid Idrees image in textbox
Hi I had paste a image in my textbox.. and worked fine.. the problem is that i cant get it from there.. i want to store all the content of the textbox in SQL Db so .. i need its content including image.. txtBox1.Text wont work.. i lose the image... does anybody knowes hwo to do that Cheers! Hi! Paste image into TextBox May be you mean RichTextBox RichTextBox has RTF property so you can save all formatting or it have SaveFile() method s ...Show All
James-MSDN File Upload with restricted extensions not working
I have a file upload class, and in it's constructor it needs to be able to take in an array of possible file extensions (using the new params keyword) I won't know how many or what extensions are being passed in, but once they are only those passed in are allowed to be uploaded. The class I'm having problems with inherits from it's parent class that works fine and doesn't restrict anything. The new inherited class compiles fine, but still allows ...Show All
L O C# 2.0: Generic Dictionary - How to lookup a Value and return the key ?
Hi There I am probably missing something fundamental here, but I cannot see a method to search the values of a generic dictionary so that I can find the key Of course I could enumerate through the Values collection but that seems a little long winded. I ended up using a sorted list because it has the IndexOfValue method. However I don't need the sorting. What am I missing fyi, the class is below TIA Bill ________________ ...Show All
jstacy Regular Expression with two possibilities ???
Hi, I have a txt file to read and I'm using this regular expression Regex rx = new Regex (@"^( <N>\d{3})\s( <DATA>\d\d/\d\d/\d\d)\s+( <TELEFONE>\d+)\s+( <LOCALIDADE>.{15})\s( <UF>\S\S)\s( <INICIO>\d\dH\d\dM\d\d)\s+( <DURACAO>\d+,\d)\s+( <MODALIDADE>\S\S)\s+( <VALOR>\d+,\d\d)", RegexOptions.Multiline); And it works fine for this data DATA TELEFONE LOCALIDADE UF IN ...Show All
JorgenL Talk to me VS 2005: Why do you go from 25 MB to 300 MB in less than 60 minutes ?
MSFT VS 2005 IDE coders VS 2005 IDE takes a lot of memory..wonder what it is doing Is there anything I can do to help it consume less memory. It sucks I don't know if you guys will be proud of 35 MB to 3000 MB in less than 60 mins.. Memory leak uh Vague question, is there anything that you guys need that I can send to help you solve this problem Thanks Hi Sivas - Can you tell me more about your solution ...Show All
Hargen How to use C# tableadapter wizard with vendor specific SQL keywords?
Hi. I really like the new tableadapter wizards in VS 2005 and how they can speed up development. However, I'm running into a problem I need help with. I am using the table adapter against DB2 and there are special keywords that the designer isn't allowing. i.e. Select field1, field2 from table for fetch only with ur ; When I enter this into the query wizard and then move off the SQL pane to another pane, the wizard ...Show All
Ed Glas - MSFT Retrieving the COM class factory for component{} - 8007007e
Hi, I am trying to take screenshots of any open Internet Explorer. I have writen the code and it works fine when I run the site in debug mode. Once the site is published I get the following error: Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 8007007e. Description: An unhandled ...Show All
adam kromm Registry Access
Here's a case : I want to make login screen and it will block Ctrl+Alt+Del Combo. So far I've known that I need to alter registry key "DisableTaskMgr". It work well when I compile it on my PC, but when I try it on another computer as user, not as Administrator, I got message that registry access (write) is forbiden. So I think I need to know if program runs in Administrator mode or user mode. How I determine that using C# At first I think that ...Show All
