pmacdonald's Q&A profile
Windows Forms Setting report Source in Visual Studio .Net
OK, I got Visual Studio .Net so that I could use a crystal report in my program my only problem is that I still cannot set the Report Source property of the Crystal reports Viewer. I have tryed many different ways that I have found through the help files and each one comes up with a different excuse of an error. Can anyone he ...Show All
SQL Server Connection failed!
Hi guys, I have problem with this code: TCHAR szCurrentDir[250]; TCHAR szDataDir[250]; lstrcpy(szDataDir, TEXT( "DRIVER={SQL Native Client};SERVER=.\\sqlexpress;Trusted_Connection=Yes;DATABASE=MyDic;AttachDBFileName=" )); GetCurrentDirectory( sizeof (szCurrentDir), szCurrentDir); lstrcat(szCurrentDir, TEXT( "\\Database\\Data.mdf;" )); lstrcat(szDataDir, szCurrentDir); SQLDriverConnect(hdbc, hWnd, szDataDir, SQL_NTS, szConnStrOut, sizeof (szConnStrOut), &cbConnStrOut, SQL_DRIVER_COMPLETE); When I run my program, I get this message: --------------------------- Microsoft SQL Server Login -------------- ...Show All
Windows Forms Bug of DataGrid (multiple deleting)
1. There is a typed DataSet, wich has just one table, that has self-to-self foreign key relation (tree struct). 2. This DataSet setted as DataSource of DataGrid ( MyGrid.DataSource=MyService.GetMyTypedDataSet() ) 3. When I delete one row in table it couses deletion of all of that children and DataSet works correctly. 4. After deletion I try to scroll down the DataGrid&nbs ...Show All
Visual Studio Unloading an Add-In
Hi, I would like my add-in to load only after it had detected that another feature is installed on the local machine (this feature can be removed without notice, hence we do not check it existence while installing the add-in). If the feature isn't there i would like to display a message to the user and unload the Add-In. Where is the best place to put this validation code I tried using it on the OnConnection event handler, but when i instruct the Add-In to diconnect (connected=false) i end up seeing an error generated by VS. Is there an example on how to do that Thank you in advance, Ariel Setti ...Show All
.NET Development SQL UPDATE - "No value given for one or more required parameters"
I've used this structure in several other C# database programs with success, until this app. Now I'm receiving this: "No value given for one or more required parameters." The key is SAMS_ID. The data is text, no numeric fields. The code I used is below. I've tried removing the single quotes from around the date field and also from around any fields that contain numbers but still receive the same error. Anyone know what I am forgetting private void buttonEdit_Click ( object sender , System . EventArgs e ) { string strEditConnect = "" ; if ( buttonEdit . ...Show All
Visual Studio Team System Problem when i want to add a new project team with Team Explorer
Hello, I have a problem in the sharepoint site (party) when i had a new project team : The message is : 8/10/2005 4:58:50 PM | Module: Engine | Task "" from Group "" completed with success | Completion time: 0 seconds 8/10/2005 4:58:50 PM | Module: Engine | Thread: 6 | Running Task "SharePointPortal" from Group "Portal" ---begin Exception entry--- Time: 8/10/2005 4:58:51 PM Module: Engine Event Description: TF30162: Task "SharePointPortal" from Group "Portal" failed Exception Type: Microsoft.TeamFoundation.Client.PcwException Exception Message: Unable to connect to the Windows SharePoint Services at lu-vsts Exception Details: The ...Show All
Visual Studio 2008 (Pre-release) DependencyProerty at run-time
Hi, Is it possible to add DependencyProperty dinamicaly at run-time thanks in advance, miljac Maybe you are talking about something like this: public static readonly DependencyProperty MyStringProperty = DependencyProperty.Register("MyString", typeof( MyString ), typeof(string), new UIPropertyMetadata(new MyString ())); [BindableAttribute(BindableSupport.Yes, BindingDirection.TwoWay)] public MyString MyString { get { return ( MyString )GetValue( MyStringProperty ); } set { SetValue( MyStringProperty , value); } } ...Show All
Visual Studio 2008 (Pre-release) Setting HorizontalOffset of a StackPanel ...
I'm trying to programmatically set the HorizontalOffset property of a StackPanel (using SetHorizontalOffset() to do this). But the HorizontalOffset remains at 0. Is there something I need to do with the StackPanel to make this happen I've set the CanHorizontallyScroll property to true, and the Orientation property to Horizontal. The width is much wider than the viewable portion of the StackPanel, yet it doesn't work for me. Could it somehow be related to the StackPanel's content (which is a grid) - HorizontalOffset is a read only property that is exposed through the IScrollInfo interface of StackPan ...Show All
Visual Basic HScrollBar and AutoRedraw
HScrollBar From the toolbox, the HScrollBar does not seem to be working (as it did in VB6) It does not fire on "Gotfocus", no matter where you click There is no "Mouseup" event for ending the scroll. Is this tool being phased out, or are there known bugs Related to this problem is Auto-redraw. I use the Scrollbar to help make a selection. As the user pulls the cursor, I have a floating textbox to provide information as the scrollbar passes the choice in question. In VB6 the AutoRedraw of the form avoided erasing stuff in the pathway of the textbox. I read that AutoRedr ...Show All
Visual C# How to dynamically Create huge grid of editable textboxes at runtime..Help..
I'm working on a windows program that will open a tsv (tab seperated file) and store the values into an arrary and then put these values into a grid of textboxes where I can edit the values. I got to the point where i parse the text files into the arrary fine and I can put the values into the grid of textboxes.. but Im creating a grid of 12 X 100 which is 12000 textboxes i manually have to put into the form through the IDE. There has to be a better way to do this at runtime. Is there a way to create the textboxes at runtime where I can put it into a loop. for example: txtbox1...txtbox2, txtbox 3 and so on...... i want to s ...Show All
SQL Server Sql server 2000 instance database diagram from management studio
I know it is clearly written in the bookonline that It is not possible to view or create Sql server 2000 instance database diagram from management studio. But could in any way I can just view the daigram(not edit) in management studio. Isn't it a good idea to give this support in the SP2 of sql server 2005 ...Show All
.NET Development What is the limit to the number of Partial files for a single class?
Sorry, but I don't know where to post this question... Best regards, ...Show All
Windows Forms How to access textbox on parent form?
I'm trying to access a textbox on a parent form from the child form. Seems pretty simple, but I just can't find how to do it. This is how I'm opening the child form: Form fRoom = new RoomAllocator(); fRoom.ShowDialog(); How do I access the parent form's text box from the child form Somebody please help! Why not try something allong the lines of: Create the following in RoomAllocator: A public refference variable. In VB it would look something like: Public ParentTextBoxRef as object Then change the parent like this: (again VB) dim fRoom as new RoomAllocator fRoom.ParentTextBoxRef = me.<the text box> You should then be able to acc ...Show All
SQL Server Connection Pooling
Is there some way to use only a single connection pool for more than 10 diferent databases You can always turn off OLE DB connection pooling and then roll your own. Add the following to the connection string: "OLE DB Services=-4". (This also turns off automatic transaction enlistment.) More details can be found here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconconnectionpoolingforoledbnetdataprovider.asp and here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/oledb/htm/oledbabout_the_ole_db_documentation.asp Other providers use their own syntax fo ...Show All
Visual C# Newbie: Two Questions on Generated Delegate Class
Hi everyone, I'm new to C# 2.0 (moving over from Java) so these might be easy. I have two questions I'd like to ask regarding delegates. I know that when I declare a delegate the C# compiler automatically generates a class that extends MulticastDelegate . Here's a simple delegate declaration: delegate bool Charlie(bool b1); First Question When I use ildasm to view the generated class for Charlie I see there is a generated c'tor that takes two parameters: an object and a native int. Yet, when I instantiate a Charlie object, I only pass one parameter to the constructor. Here's an example: Charlie c = new Charlie(someMet ...Show All
