Gobi N's Q&A profile
Windows Forms combo box
I am populating combo box using a dataset. Something like as follows: cbo.dataSource=dataset cbo.DisplayMember="Name" cbo.ValueMember="ID" How is it possible to have an extra item right at the beginning. This is what I am doing to get an empty item in the combo box: cboIndexTypes.SelectedIndex = -1 The problem with this is that the combo box only shows the empty item first time when it is populated. If an item is selected from the combo box then it seems that this empty item disappears. I would like the empty item to stay inside the combo box whether or not I select other items in the control. Thanks What we have done is to sub-class the ComboBox (you should always sub-class yo ...Show All
SQL Server How to use a stored procedure with parameter variables in SSRS
This might be a really dumb question, however I'm having trouble getting this to work. I created a stored proedure that takes two date variables as such USE [PdAurius_MonthEnd] GO /****** Object: StoredProcedure [dbo].[spBacsTrans] Script Date: 09/13/2006 09:19:24 ******/ IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_NAME = N'spBacsTrans') DROP PROCEDURE spBacsTrans GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[spBacsTrans] @startdate DATETIME, @enddate DATETIME AS SELECT txns.trandate, ac.accno, nonpers.name, txns.bookamt, txns.txnclrcode as 'clrcode', right(txns.txncode,2) as FeeType, left(txns.txncode,4) as TxnType, txns.empl, txns.desc1 FROM txns , acct ac ...Show All
Visual Basic Constant or not to constant
I was wondering is Constant better than inline code for example: public class example const MyHello as string="Hello world" private sub Button1_Click(........) messagebox.show(MyHello) end sub end class To this: public class example2 private sub Button1_Click(........) dim MyHello as string="Hello world" messagebox.show(MyHello) end sub end class Forgive the coding simplification, just typing directly what i think is needed. I was planing on using it to be able to program a different language in a future version. Unless if there is another way to do multiple languages and a basic tutorial on how to do it would be apreciated. ...Show All
Visual Studio Tools for Office How to Associate Custom Data with XMLNode object?
What is the best way of associating application-defined data with XMLNode objects Word's XMLNode object doesn't unfortunately have the Tag property (like many other Office objects), where I could store some data. Also I can't create a Dictionary, because XMLNode objects cannot be used as dictionary keys - they are obviously (like Range objects) volatile views of some opaque internal objects. In other words, (node1 is node2) can be false even if node1 and node2 are actually the same node in the source XML. Another option is to use what I call "paths", i.e. an array of integers where each element represents the index in the array of sibling nodes of the current parent node, recursively. This method would be great but it goes ...Show All
Windows Forms Customize Toolstrip problem!
Hello! I am using this: http://msdn2.microsoft.com/en-us/library/ms181004.aspx to show a dialog to customize the toolstrip. I have two toolstrips and would only like to customize one in the dialog. When I run this, all of the items from the second toosltrip are available as items i can add to the first toolstrip. How can I fix this How can I choose what items I want the user to be able to add to the toolbar. Matt ...Show All
Visual Basic I need a delay in visual basic program
I am writing a visual basic program that display the file from a directory in a list box the app has a button which calls routines to 1. delete files in the directory 2.put some files in the directory 3. get the file info from directory and add file names to a list box here is code for step 3 my sub My .Computer.FileSystem.CurrentDirectory = "C:\mtmp" ' Create a reference to the current directory. Dim di As New DirectoryInfo(Environment.CurrentDirectory) ' Create an array representing the files in the current directory. Dim fi As FileInfo() = di.GetFiles() Dim fiTemp As FileInfo For Each fiTemp In fi ListBox1.Items.Add(fiTemp.Name) Next fiTemp end sub ...Show All
Visual Studio Express Editions Is it possible to use two OLEDB datasources In this Way?
I am wondering if its possible to do something like what I have in my adaptor= line below (which doesn't work at the moment). All I am really trying to do is come up with a quick and dirty way to pull a few rows out of one database/table and pop them into another database/table: Dim constr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Media\Databases\Configurator.mdb" con = New OleDbConnection(constr) dt = New DataTable() adapter = New OleDbDataAdapter( "Select * into Customers2 from [Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Media\Databases\aDifferentDatabase.mdb].Manufacturer_Series" , con) Dim tmp As New OleDbCommandBuilder(adapter) con.Open() adapter.Fi ...Show All
Visual Studio Tools for Office Attaching objects to mails in outlook using c#
Ive developed an add-in to Outlook 2003 in c# using vs2003 and Vsto. In that i would like to attach an object of a user-defined class created in the project to an Outlook mail-item. This mail item is then stored on the hard-disk. Thanks for you response Sue, I was hoping that you could also help me with the first part of my question. After i have created the object and stored values in it, it remains as an in-memory object. (The object i am creating it is from a simple structure that i have derfined.) I need to create the object and attach it within the same program. Can i refer to the object by simply refering to its name or must i use a path ...Show All
Visual Studio 2008 (Pre-release) Return value of Interface type
hi all how can i declare Method in service with Interface Type Return value for example [ ServiceContract (Name = "TestService" , Namespace = http://test )] public interface ITestService { [ OperationContract ] IUser [] GetAvailableUsers(); [ OperationContract ] I User AddUser( string userName); } my question is, how i can call this service and receive the value of IUser thanks Gili Does this thread help Cheers, ...Show All
Windows Live Developer Forums Adding my own custom 3D content
I wonder how i can add my own custom 3d stuff into the 3d-View of the map. You can clearly see this is the future of getting the most upto date information. Let anyone submit data - wiki style. High detailed imagry, 3D buildings, even correction to streets (we have a major road in Brisbane that is 50m off on every map) I don't think MS will have the capabilites to do this, there is intellectual property / licenses / legal issues for a large company. But there is definatly a need. We are promised in the future we will be able to add our own 3D objects in VE and purhaps a community site where you can submit your own building would be a great idea. John. ...Show All
Software Development for Windows Vista invoking xoml only workflow
Dear all, I'd like to make a custom activity that can invoke xoml only workflow asyc. My xoml don't have x:Class attribute, because i'm thinking of XAML activation. XmlReader reader = XmlReader .Create( "myworkflow.xoml" ); WorkflowInstance instance = runtime.CreateWorkflow(reader); If i had a complied type it's simple as my code snipet shows. public Type WorkflowToInvoke; protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { Dictionary<string, object> prms = new Dictionary<string, object>(); IStartWorkflow starter = executionContext.GetService<IStartWorkflow>(); starter.StartWorkflow(WorkflowToInvoke, prms); return ActivityExecutionStatus.Closed; ...Show All
Visual FoxPro ComboBox Question - Load field from
I have a form that has fields from my transaction.dbf database. I want to add a combo box that lists the customer numbers I have setup in the customer.dbf database. What I did was to set the RowSource to Data\customer.dbf, and set the RowSourceType to "6 - Fields". I keep getting "Field Phrase Not Found" error message when I run the form. I've read through this forum and read the Visual FoxPro 9 help text and I'm still confused. Any advise Derek You should open the Customer table in the dataenvironment for the form. Right click the form's background and select dataenvironment. ...Show All
Visual Studio Team System CTP7 BUG - Block Schema Updates if Data Loss Might Occur - Does not block data loss
CTP7 - Tools->Options->Database Tools->Schema Compare ->Block schema updates if data loss might occur IS CHECKED. - Project Properties->Build -> Block Incremental Deployment if data loss might occur IS CHECKED I would expect, as the options are self explanitory, that a deploy / or schema compare would be blocked when I refactor a COLUMN name. At least the refactor wizard warns you that there will be data loss if there is data in the table. If I don't use the refactor wizard I will not get this warning, and apparently the option does not prevent the update / data loss. Tests here have definately resulted in data loss using schema compare and deploy. Scenario - renamed a COLUMN from "Text7" to "Text4 ...Show All
.NET Development "Error 5 - The ConnectionString property has not been initialized. " message appears before loading my form
Hi all, I'm creating a new windows form project, and referenced on the System.Data dll and Imports System.Data.OleDb, but before my form even shows (I put a break on the first statement of my form load event, but it hasn't even fire), the debugger throws me this error: "Error 5 - The ConnectionString property has not been initialized." and the immediate windows shows this: "A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll" But then my form loaded up normally after I click away the Error 5 message box, with data from my db correctly shown in the comboboxes desired, too... I'm using visual studio 2005 with vb.net, and my db is in MS Access 2003 forma ...Show All
Visual FoxPro Source from internet
Where can I find a source on the internet where will be wethear forcast for Slovakia and the other world... I want to include it in my program, to show the weather forcast, just temperature, humidity, air pressure, wheter it will rain, or snow, etc. Don't know wheather this kind of source exists... Thank for your advice O.K. forget about what I wrote before... I will make it other way... I want to export some infos from site... Is there a way how to do so ...Show All
