Mark Jewett - MSFT's Q&A profile
.NET Development Update Query not updating or issuing exceptions
Hey guys I have this Access Query I am trying to run in C# windows app the Query from access UPDATE tblStaff SET tblStaff.Record_Password = [ NP], tblStaff.LastUpdatedBy = [ LB] WHERE (((tblStaff.CorpID)=[ CD]) AND ((tblStaff.Record_Password)=[ CP])); C# code OleDbConnection objConn = new OleDbConnection(); objConn = Config.ConnBuilder(); OleDbCommand oCmd = new OleDbCommand(Query,objConn); oCmd.Connection = objConn; oCmd.CommandType =CommandType.StoredProcedure; oCmd.CommandText = "PwChange"; oCmd.Parameters.Add(" NP" , OleDbType.VarChar).Value = newPass; oCmd.Parameters.Add(" LP" , OleDbType.VarChar).Value = updatedBy; oCmd.Parameters.Add(" CD" , OleDbType.VarChar).Value = corpId; oCmd.Parameters.Add(" CP" , OleDbTy ...Show All
.NET Development How to easily load data from an XML doc?
Let's say I have an XML file that looks like this: <profiles> <profile> <name>My First Profile</name> <defaultColor>Color.Blue</defaultColor> <size>6270</size> </profile> <profile> <name>New Test</name> <defaultColor>Color.Red</defaultColor> <size>500</size> </profile> </profiles> And I basically want to load this data up in a simple method, such as the example below (pseudo-code): xml = LoadXML("blah.xml"); foreach profile in xml // profileName = xml.Get("name"); // myColor = xml.Get("defaultColor"); // pageSize = xml.Get("size"); next How could I do this in C# ...Show All
Windows Live Developer Forums Windows Live Messenger Problems Forcing Closure after using MicrosoftR LifeCam VX-3000
Has anyone else had this or a similar problem following Video Conversations using a MicrosoftR LifeCam VX-3000 !! This is a new problem that did not occur using a Logitec Web Cam!! Not sure if I've missed something but this problem occurs on both my computers using separate, but identical cams You should post this question in the news groups forum for messenger. there are many people there who can answer this question. But, to answer the question as a side note :) yes it works for me. did you make sure that you have the most recient version of messenger installed and the most recient driver for the life cam. Post your question to the news group though . ...Show All
SQL Server Space allocation for NULL
hi, what is the best method to know the space consumption by a table object is it DBCC showcontig another thing is i have a table named tbl1 and having 2 columns Id and name , when i put 5 records with name as null as below Id Name 1 NULL 2 NULL 3 NULL 4 NULL 5 NULL will sql server allocates space for null values if so how much Mat Hi it seems there is some confusion here to avoid that i will put the scenario more clear... Table Name-T1 columns-Name(Varchar(50)),Null select * from T1 Name NULL NULL NULL NULL NULL dbcc showcontig(T1) DBCC SHOWCONTIG scanning 't1' table... Table: 't1' (258099960); index ID: 0, database ID: 5 TABLE level scan performed. - Pages Scanned........................... ...Show All
SQL Server KPI design and implementation
Hi all, I'm fairly new to analysis services and am encountering some difficulties when it comes to designing KPI's. I want these to be designed so that they may be displayed in a KPI list on Sharepoint 2007 server. The basic premise for the simple data warehouse pilot was to present usage data for a number of customer sites split up but time etc. These sites also have a potential usage value attached to them. I'd like to implement a KPI that shows the current progress in the current month for there usage against the site's potential. A cylinder or thermometer type diagram i believe would work well to show the progress as a percentage value. This may be to vague a description and i'm willing to elaborate further if necessary but could someo ...Show All
Smart Device Development a strange problem,please help me!!
My .net is vs2003,the version of netframework is 1.1.4322 recently I began to program in intelligent device,using c# on pocket pc 2002 simulator.but file operations always have problems,for example: private void button2_Click(object sender, System.EventArgs e) { StreamWriter SW; SW=File.CreateText("c:\\shiyan.txt"); SW.WriteLine("123"); SW.WriteLine("345"); SW.Close(); } unhandled exception: System.IO.DirectoryNotFoundException: but this code run well in pure windows programs.Only in simulator can it have such problems.the file tpye of my harddisc is fat32. another question is: MessageBox.Show(this, "保存成功!", "tips",MessageBoxButtons.OK,MessageBoxIcon.Question, Messag ...Show All
Visual C# How to insert a paragraph?
I'm very new to VS.NET C#. I'm creating a simple app. to launch a flash tutorial. In the form, how do I insert a paragraphc explaining what this app. is going to be I tried the Lable control but it does not give me multi-line option. What do I need to use Thanks! ahmedilyas wrote: multiline property is only available for the Textbox control. I've actually just tried to set a long piece of text on a Label control (with autosize = true) and it works, it does show the text in its full. I'm also using VS.NET pro 2005 This is what I did for my test on a label: this .theLabel.Text = " this is just a small label to start out with and now..." + Environment.New ...Show All
Software Development for Windows Vista DIY information cards - Issue with enveloping signature
Hi, it looks like I could need some help. My situation is following: - I create DIY cards through some homegrown Java code - I sign these DIY cards with Apache xmlsec version 1.3 (latest release). Verification works with this toolkit. - The CardSpace application always refuses to import the crd files saying " An error occurred during the import of a card. Errors in reading the imported card file. " in the event log (Event ID 260) - The signature verification seems to work (if I manipulate the signed data, I get the event description " An incoming identity could not be validated. Signature could not be verified. ") - The signature path validation seems to work (if I removed the trusted certificate, I ge ...Show All
Microsoft ISV Community Center Forums Using VBA macro to locate next free column on worksheet
I need a macro that locates the next free column (i.e. has no data in cells) and then places the cursor in a cell on a designated row. Would like search to start from column B and to place the cursor on row 4 on the free column. <> My VBA code thus far: Function NewColNumber(Range1 As Range) As Integer Dim j As Integer For j = 1 To Range1.Columns.Count If Range1.Columns(j) = "" Then NewColNumber = Range1.Columns(j).Column Exit Function End If Next End Function Sub SaveCOLComments() On Error GoTo Err_Part Dim Range1 As Range Dim intNewColNumber As Integer ' ...Show All
Visual Studio 2008 (Pre-release) DataBinding ListBox.ItemTemplate = (DataTemplate)FindSource???
I would like to DataBind the ListBox with the Existing <DataTemplate x:Key=" "> Template ok,i'm trying to DataBind the Current ItemTemplate that currently Exists in Xaml first here is the C#:: ListBox.ItemTemplate = ( DataTemplate )FindResource( ResourceKey .Equals(StackPanel.GetBindingExpression( BindingMode .OneWay, System.Xml.XPath. XPathExpression .Compile( XPath=@version )))); The Xaml DataTemplate:: < DataTemplate x:Key = " itemTemplate1 " > < StackPanel x:Name = " StackPanel1 " > < TextBlock x:Name = " TextBlock1 " Text = " {Binding Mode=OneWay, XPath=title} " /> < TextBlock x:Name = " TextBlock2 " Text = " ...Show All
Visual Studio Team System Can I add a field to a work item after the project has been created?
On my project we modified a process file and accidently removed a field from one of the work items screens. Is it possible yet to make modification to the process of existing projects Yes, you can modify work item type and import it using witimport tool ( http://msdn2.microsoft.com/en-us/library/ms253163.aspx ). Also check witexport tool to export the current form. ...Show All
Visual Studio Express Editions DataReader from VB to C#
Hi! I want to ask you how to translate this. when: Sql DataReder dr; dr = cmd.ExecuteReader(); dr.Read(); VB: txtBox.Text = dr("Name") C# txtBox.Text = dr("Name"); // this ends Error! This DataReader is handled like the method but why VB makes no Error Thank you! but, in shamefulness, I am sometimes such a mistake and stumbling. I want to disappear... ...Show All
Windows Search Technologies Taskbar, Deskbar problem
Hi all ! I have written a deskbar (program to sit in the taskbar with it's own icon) and registered it which works fine. If I right click the taskbar goto Toolbars I see my program listed as "IT Help" and can tick it to turn it on and off and this all works great too. My problem is how do I automate this tick using a script or a registry setting I want to add the deskbar to 4000+ machines and can't visit each desktop to turn it on, nor can I ask the user to either. Any help would be excellent as I've puzzlled over this for some months now. Kind regards Mark ...Show All
Visual Basic .Net dll stopped working in VB6.0 after migration from .Net 1.1 to .Net 2.0
Hi, I have been using a .Net dll developed using Visual Studio 2003 in VB6.0 through com interop. .Net dll is not strongly named and it is registered using /codebase option. It has been working fine. I have recently upgraded this project to Visual Studio 2005, recompiled it with register for com interop option turned on in the project properties. I tried using this new .Net dll in VB6.0 and got this error. Run-time error '-2146233079 (80131509)': Automation error I have both .Net framework 1.1 and 2.0 installed on my machine, not sure if that can be an issue. I would really appreciate if somebody can help me out. Thanks. javaid It depends how I instantiate the object. If I declare and in ...Show All
Visual Basic Opening File in textbox
How would I open a file selected in an openfile dialog in a richtext box Thank You! thegodfather9210 wrote: How would I open a file selected in an openfile dialog in a richtext box Thank You! I believe that the RichTextBox has a .LoadFile (or similar) method. You can use that to load the file... As for the OpenFile dialog, I assume you already know how to do that ...Show All
