BilalShouman's Q&A profile
Windows Forms DataGridViewCheckBoxColumn don't work with values 1 and -1 for false and true
Hi I'm using VS2005 to display some data from table. In DataGridView I have a DataGridViewCheckBoxColumn who don't work with values 1 and -1 for false and true. If I put 1 and 0, or true and false, or Y and N is working. The problem is taht , the database is already using this values, program is ported from delphi to c#. How can I make this work Thanks Paul I have specified this from design interface. I tested your code but i get same results. Don't want to accept changes...:(( Its working only with Y/N data. I would like to change checkbox to combo, but I don't know how to sincronize populated combe whit data from table, to displai in combo name for index from table.It's one idea! ...Show All
SQL Server sql2000 on win2003 server
Hi, I want to install SQL 2000 Server on Win-2003 STD Server and transfer the database that has been running on SQL-2000/Win 2K server. Win-2003 Server has Apache services and TrendMicro AV Server running. After installation the SQL service starts automatically. But I am not able to see the database from Enterprise manager. It gives error 'A connection could not be established to <local>. Reason: Login failed for DOMAIN/USER. I am logged into Win2003 server as 'Administrator' for installation. SQL Server authentication in Mixed Mode and connect using Domain user account. While applying update(SP3) also the same error comes after trying to validate password and the Sql service automatically stops. I tried using bo ...Show All
Smart Device Development Draw Gradient Background - Error with Tabs
Hi all, I'm trying to draw a gradient (linear) background on my devices. I've found some stuff using System.Drawing.Drawing2D.LinearGradientBrush but for some reason my application doesn't seem to be able to find it. I can get System.Drawing.Drawing2D but that's as far as it goes I also can't find SystemGradientColors and ControlPaint which are things I need. I'm using CF2. Any help would be much appreciated. Kind Regards, Grant. The .NET Compact Framework does not support the LinearGradientBrush class. Windows CE does support an API called GradientFill you can use instead. Here is a sample how to use this API: http://msdn2.microsoft.com/en-us/library/ms229655.aspx Michael ...Show All
.NET Development does it make sense to use #If Debug Then and #If LIVE Then
Or should we use another practice to execute certain code if we re in debug while we execute another code while we are in release. what is a good practice to do that pls. Thanks R.Tutus wrote: Perfect. That answers my question. How about if we want to include several methods in debug only. that means we should include as many [System.Diagnostics. Conditional ( "DEBUG" )] as methods or can we use a single [System.Diagnostics. Conditional ( "DEBUG" )] with multiple methods and close it at the end. is that possible. Thanks a lot The ConditionalAttribute can be applied to methods or classes. If you wanted all members of a class to be debug-only you could apply Conditional("DEBUG") ...Show All
SQL Server Union problem
I have follow query declare @z int select id from table1 union select id from table2 i want after union in @z save value 0, 1 or 2. 2 - when first and second select returns any results 1- when one of selects return any result, and another return nothing 0 when both selects returns nothing Can you help me. How i solve this problem Jordan, If you have no where predicate/filter, the entire table is scanned. Also, substring() is your only way to extract data from a blob column. There isn't much we can do there to improve perf. ...Show All
SQL Server Problem installing SQL 2005 Server Express
I have the beta versions installed, got an error: Microsoft SQL Server 2005 Setup beginning at Wed Aug 16 18:14:14 2006 Process ID : 4668 c:\8c27e35b5d509dc8609c33e266\setup.exe Version: 2005.90.2047.0 Running: LoadResourcesAction at: 2006/7/16 18:14:13 Complete: LoadResourcesAction at: 2006/7/16 18:14:13, returned true Running: ParseBootstrapOptionsAction at: 2006/7/16 18:14:14 Loaded DLL:c:\8c27e35b5d509dc8609c33e266\xmlrw.dll Version:2.0.3609.0 Complete: ParseBootstrapOptionsAction at: 2006/7/16 18:14:14, returned true Running: ValidateWinNTAction at: 2006/7/16 18:14:14 Complete: ValidateWinNTAction at: 2006/7/16 18:14:14, returned true Running: ValidateMinOSAction at: 2006/7/16 18:14:14 Complete: ValidateMinOSAction at: 2006/7/16 18 ...Show All
Visual Studio 2008 (Pre-release) how to bind to a dictionary (or something like that)
I've got a dictionary<String,Object> and want to bind a xaml object to the key of the dictionary so it shows the corresponding value. So far I only found ways to bind to get/set accessors, or to attached DependencyProperties, but can't find a way to bind to the key of a dictionary. Is there any way to bind to something like this thanks, Sam Zhou Yong wrote: From your description, I think you should choose DataTable rather than Dictionary as your source collection. This problem description is only part of my overall problem - I tried to use DataTables instead, but they lack something else I need: they lack an event when a row is accessed. Not changed, but accessed. I'm trying ...Show All
Visual Studio Express Editions ArrayQuestions
How do i have an array that doesn't have a size How do i store an array in the my.settings Shoot, got that wrong. Really meant to say "Perverse" to get the point across. Thanks for the correction. ...Show All
SQL Server Using Views/Stored Procs in one Db, Data in Another
I am moving an app from Access 2003 to C#/SQL Server 2005. The Access app has one front end exe and two back end databases. One back end db is for UK users, one for US users. The tables and structures are identical, but the data is different. UK users link to the UK back end, US users to the US backend. (The queries are in the front end) In SQL Server, the view and stored procs will be in one database (KCom), the US data tables in another database (KUS), and the UK data tables in another (KUK). All databases are on the same server. My question is how to let the views and stored procs in KCom know whether to pull the data from KUK or KUS. In the front end app, I use ADO.Net to deal with the SQL Server databases. I have not been able to fi ...Show All
Visual Basic How do I write a box to a textfile and print
I am converting a check writing app written in FoxPro to VB and can't seem to find a way to put unicode characters in Mystream.writeline to create boxes, tables and shading. Everything has to laid out in a specific spot so the check printer software can read the data from the input file and know which field to put on the check. My lastest attempt was this MyStream.WriteLine(ChrW(2554)) but it gives me a small box about the size of an eraser head and not this ─. Thanks, Phil What type of stream are you using...filestream, streamwriter...etc... You may want to consider using the streamwriter and explicitly stating the encoding to be used in the contructor of the stream: public StreamW ...Show All
Visual Studio Team System WorkItem Project Alerts not working
Hi, We have project alerts working fine for "Build completes" and "Anything Checked in" project alerts. But NOT for the "work items changed by others" setting. Any idea why this is the case We have been creating and assigning work items up the wazoo but no alert emails so far... I don't see errors in the event log either. Thanks, JGP JGP, the subscriptions need to be added either using bissubscribe tool, or using client APIs (pointer in the post), and not directly in SQL. You can add many subscriptions in a loop using either of those approaches. ...Show All
SQL Server convert character data to datetime
Hi! I need to insert character data into a SQL 2005 table in the datetime format. The strings I need to convert are in the following format: ddmmyyyy I tried using case and convert: cast('08162006' as datetime)) convert(datetime,'08162006',101)) Both attempts fail with the following error: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. Any advice is greatly appreciated. Thanks. I'm not sure why you feel that the solution posted didn't work. The string is clearly in MMDDYYYY format, and that's exactly how the conversion treated it. Definitely the expected results. As for your contention that, " the style parameter isn't ...Show All
Visual Studio Express Editions changing a picture into acii characters
how would i change a picture into its ACII equivalent so it would look like a picture made out or letters and symbols DMan wrote: To create an ASCII visual representation would be a very complex task that would include mapping pixels to characters... You may wish to start looking into the Imaging namespace: Namespace System.Drawing.Imaging Member of: System.Drawing Summary: The System.Drawing.Imaging namespace provides advanced GDI+ imaging functionality. Basic graphics functionality is provided by the System.Drawing namespace. ...Show All
Windows Forms KeyCode, KeyData, KeyValue... What's the difference?
So the subjects says it all... Right now, I'm trying to set a method for when the user presses the 'Enter' key in a text box. Thus far, I'm thinking of putting it in the KeyDown event for the textbox. And my issue lies here. I can't decide/figure out how to go about doing so. There's a ton of ways, I know. I'm starting to get back into the whole programming thing, and this is something I can't seem to find anywhere. So, in deciding whether it was the 'Enter' key that was pressed, which would be best KeyCode, KeyData, or KeyValue And just to make sure... The main question here is the difference though... I can't seem to figure it out. They all kinda boild down to the same thing, right They're all for determining which key was pressed. An ...Show All
Visual Studio Team System Adding custom attributes to Team Project
Hi all, is there a way i can add custom attributes at the team project level like if i wana add property called Category just to categorize team projects in our organization btw i'v seen process templates etc.. i dont think theres something like this..any idea regards faraz Faraz: Yes you can add attributes and fields to the process templates. first , you have to download the process template that you want to change. Open visual studio 2005 and navigate to process template manager and then down load the template you want to change to your machine. then go in to the MSF for Agile Software Development - v4.0 (FMG Custom)\WorkItem Tracking\TypeDefinitions then edit the task.xml file and add the fields for e ...Show All
