Software Development Network Logo
  • Architecture
  • Visual Studio
  • Microsoft ISV
  • Visual J#
  • VS Express Editions
  • Visual C++
  • Visual Basic
  • Windows Live
  • Game Technologies
  • Visual FoxPro
  • Visual C#
  • .NET Development
  • Windows Vista
  • Smart Device
  • SQL Server

Software Development Network >> BAMoreno's Q&A profile

BAMoreno

Member List

Michael Lane
OCCcoach
Barry Mavin
GabeOSM
Chris Hampton
Keystone
Siva Rama Krishnan V
Ben Westbrook - MSFT
TomazZ_
SROSeaner
paul388
MartinL
John Brownell
Emin
n8dagr8
Revanger
T. McClung
Ashwin Murthy MSFT
V Batishchev
Cesar Ronchese
Only Title

BAMoreno's Q&A profile

  • SQL Server Cannot set Default value for column using "Alter column"

    Well here's one of those excruciatingly simple obstacles: In SQL Server 2005 (Mgmt Studio): according to BOL, the syntax to set a default value for an existing column is: ALTER TABLE MyCustomers ALTER COLUMN CompanyName SET DEFAULT 'A. Datum Corporation' However, when I Check: alter table CommissionPayment alter column Amount Set Default 0 I get the error message: "Incorrect syntax near the keyword 'Set'." No other combinations of this syntax work. Help! What am I missing DEFAULT is not a column property in T-SQL -- it's actually implemented as a constraint.& ...Show All

  • Smart Device Development NotSupportedException in PInvoke for .NetCF C# project

    I have a dll in C++ with a function called fun1: typedef void (WINAPI *fp)(); typedef struct info { DWORD size; RECT rc; fp funPtrcb; }*info; _declspec(dllexport)DWORD WINAPI _cdecl fun1(IN info pinfo); My C# application has this code: public delegate void CB(); public struct Init { public UInt32 size; public RECT rc; public CB funptr; } [DllImport("xxx.dll")] public static extern Int32 fun1([In,MarshalAs(UnmanagedType.LPStruct)] Init initstruct); Init in = new Init(); CB myCB = new CB(method1); init.funptr = myCB; int x = fun1(init); I f ...Show All

  • SQL Server multiple columns in "in" search

    Is it possible to put a set of columns into a select statement using "in" For example: select count(*) from table1 where (col1, col2, col3, col4) in (select a.col1, a.col2, a.col3, a.col4 from table1 a where........) This is possible in this form for Oracle and DB2 but I cannot get it to work in Sql Server. Any ideas In SQL Server 2005, you can also specify TOP clause for DML statements. So you can run a batch like below which will delete 1000 rows at a time: while(1=1) begin delete top(1000) from schema.datas1 from schema.datas1 ..... if @@rowcount = 0 br ...Show All

  • Windows Forms System.NullReferenceException in RichTextBox while dynamically adding text

    Hi, I have a rather strange problem with RichTextBox controls. My form has 2 RichTextBox controls and a TreeView. During the runtime, I'll be writing data to both the RichTextBox controls for every 100 m.sec. During this process after some time, which is not always the same, I get the following exception : System.NullReferenceException: Object reference not set to an  ...Show All

  • Windows Forms Trying to Display Boolean as Graphic

    Excuse my 'newness' . I am trying to display a on a bound datagrid a boolean value as a graphic. (A red or green button) is there an easy way to do this  I have my column as a template and I have been messing around with binding the data to the graphic. I can't figure out the red.gif if false or green.gif if true part. Any ...Show All

  • Windows Forms how to fix the size of a window?

    hi there is a windows form i want to fix it's size , in a way , that user can't maximize or minimize it. for example a window to ask username and password , it shouldn't be sizable. i set the formborderstyle property to fixedtoolwindow , but if user double clicks the frame, it will be maximize! how can i fix it thank u Hi, I guess its not possible. That's the default behavior of windows forms. Unless if you turn-off the title bar your window couldn't fix its location...     cheers, Paul June A. Domag ...Show All

  • SQL Server Database Diagrams

    TITLE: Microsoft SQL Server Management Studio ------------------------------ Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects. ------------------------------ BUTTONS: OK ------------------------------ I don't know what is the meaning of the above message, which I get when I 'right click' the Database Diagrams node of the Northwind database. Every thing seems OK, since I am t ...Show All

  • SQL Server Foreach Loop based on Variable String separated by Semi-Colon Items?

    Hi, How can i integrate a foreach loop based on a variable that have for example "ONE;TWO;THREE" and i want to run for ONE, TWO and for THREE items... Is this possible using the foreach task Or do i have to code it in a script (not a good ideia) Best Regards, Luis Simoes The easiest way to do this would be to have a script task inside a for loop that strips off the first item in the string and stores it in a variable. You can then use that variable in whatever way you want to. When the string is empty - set a boolean variable to false. The for loop should only execute if that boolean variable is true. -Jamie ...Show All

  • Smart Device Development how to create a WM5 Pocket PC app and how to run in emulator?

    I installed vs 2005 v 8.0.50727.26 (RTM.050727-2600) - I think it said it was an RC. Then installed Window Mobile 5.0 Pocket PC SDK. I have these problems/observations: 1. My pocket pc project c# that I had previously developed in vs.net 2003 which I converted to vs2005 does not offer to debug in a Windows Mobile 5.0 emulator.. The emulator manager shows a folder Windows CE 5.0 but has no images under it. 2. I tried creating a new project, I do not see any WM5 Pocket PC project type, but I see a Windows CE 5.0 (no pocket pc/smartphone choice). I tried creating a project of this type, but the default forms seem to be in traditional CE/jord ...Show All

  • Visual Basic Excel automation with VB.NET

    Hello, I have done some Excel-to-VB.NET automation, so I am familiar with the basics.  I have gotten stuck on doing Subtotals. The VBA macro looks like this:: .Selection.Subtotal(GroupBy:=2, Function :=xlSum, TotalList:=Array(5), Replace:= False , PageBreaks:= False , SummaryBelowData:= True ) I cannot figure out how to reference the  "Array(5)" object in VB.NET.  Any ideas Thanks for any suggestions. Mister T   (Using VB 2005 Express Edition) I'm having the same trouble. Also, I can't get the "sawtooth" out from under the Selection.Subtotal. I'd appreciate & ...Show All

  • Visual Studio Express Editions Visual Express C++ documentation..

    Hi, I'm not used to work with compilers and need some help with Visual C++ Express. Does there exist some documentation  for dummies that explains some - if not - all the features I'm hoping for some free documentation! Cheers Thomas When you install the software it installs the MSDN for the Express product, this is the main source of documentation that you will need. The next source of documentation will be here and on the online MSDN site. Also I am moving this thread to the C++ Express forums as you will get better answers in there as other C++ users will be listening there. ...Show All

  • Visual Studio Team System Import Database Schema Keys not imported as expected

    Greetings, When I use Import Database Schema on an SQLServer 2000 database project (from an SQL Server 2000 database server) none of the keys, constraints or indexes are imported against the tables. They all appear to be there but are created as objects at the same level as the tables (i.e. under the Tables folder in the tree view) instead of in the appropriately named folders under each table. Everything looks good in Query Analyzer and even if I target SQL Server 2005 the import is the same. All these objects have a red exclamation mark but no errors appear in the error list. Also all my stored procedures and user functions ha ...Show All

  • Windows Forms IExtenderProvider and Design Time Attributes

    How do I apply design time attributes to my IExtenderProvider class's properties that it's providing   Do I put the attributes on the Get or Set method, or is there another way   I have an IExtenderProvider that provides a property thats a collection.  I want to apply the DesignerSerializationVisibility.Content attribute to the property, but there is no pro ...Show All

  • Visual Studio No items in the toolbox

    I have created a brand new Domain Specific Language Designer project based on the class diagram template but when I debug the solution and open the sample file there are no items in the toolbox.  Can anyone help   This even happens if I try to run one of the samples from the Microsoft DSL Tools Samples - November 2005 At the Microsoft DSL Competency Workshop I went to in December, the same thing happened to me. Our coach - the wonderful Annie Matthewman - told me to restart all my Visual Studio instances (I don't think I had to reboot). Worked for me! ...Show All

  • Visual Studio Express Editions Master-detail from two tables

    I have successfully linked several controls on a form to data from a table with the use of bindingsource. But what if the data is in two tables I have tried to use one bindingsource for each table - but how do you link this together Thanks! Maria Hi, here is an article about that: http://msdn.microsoft.com/library/default.asp url=/library/en-us/vbcon/html/vbtskcreatingmasterdetailslistwithdatagrid.asp ...Show All

©2008 Software Development Network