Amit Paka - MSFT's Q&A profile
Visual Basic WScript is missing/broken
Hi I have an app I built a while ago under Win2000, but have since "upgraded" to XP.... It appears to compile just fine, but when I run it on another machine, I find this in my log: Public member 'exec' on type 'IWshShell2' not found. Meanwhile, back in my IDE (either VS 2003 or 2005, same thing), the only thing that shows up in the autocompletion for oShell, after creating it like this... is "GetType" oShell = CreateObject("WScript.Shell") obj = oShell.exec(strExec) Note that the .exec remains lower case. It's like I'm missing a reference to whatever the WScript.Shell is in. Any ideas At this point I'm seriously considering chucking this entirely and starting over with java. Thanks ...Show All
SQL Server Dividing a Column
I have a column that contains the persons Full name. I would like to split it so that it contains the persons First Name and Surname. Can i do this from a select command. Hope you can help e.g. Full Name -------------- Dave Smith Want to acheive First Name Surname Dave Smith Just to add to what has been said, I have to rant just a tiny amount here about normalization because you are feeling the pain now of having to deal with it. NEVER store values in your database like this. If you have to use SUBSTRING in a join, or view definition, you need to rethink your storage and break down the data... In your case, create a real column for full_name, and one f ...Show All
Visual Studio Express Editions how to: how to fill a list in a combobox based on the selectedvalue of another combobox?
hi, im really new to programming and i was hoping if someone could help me out how to fill the contents of combobox2 based on the selected value of combobox1 any help is greatly appreciated, thanks.. Hi mate I think u might need something like this: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cnMembers As New SqlConnection(My.Settings.MembershipConnectionString) Dim strSQL As String = "SELECT MemberID, Lastname FROM dbo.Members" Dim cmMembers As New SqlCommand(strSQL, cnMembers) Try cnMembers.Open() Dim sdrMemberID As SqlDataReader = cmMembers.ExecuteReader With sdrMemberID If .HasR ...Show All
Visual Studio 2008 (Pre-release) Disable visually impairing ClearType in WPF?
Hello, I'm a developer and spend quite a bit of time on the computer. After upgrading to the latest expression betas, I noticed the expression products got a nice UI overhaul. They look nice! However, I wear glasses for viewing objects in the distance because of my myopic vision and I do not use my glasses while working on the computer because I can see things quite clearly up close. I've tried ClearType technology in the past, and tried various ClearType PowerToy tweak settings and still find that clear type anti-aliases fonts and makes them appear "blurry", "fuzzy" and "soft". After working with the new expression products with ClearType enabled for about 3 minutes, my ey ...Show All
Visual C# Picture + Text in One richTextBox
Dear All I want to create a RichTextBox, and then i want to show picture and Text at a time, suppose Welcome to MSDN Forum how can i accompalished this task. Thanks thanks, mesion accomplished private void button2_Click( object sender, EventArgs e) { FontDialog fdlg_SendMessage = new System.Windows.Forms. FontDialog (); if ( DialogResult .OK == fdlg_SendMessage.ShowDialog()) { ...Show All
Windows Forms Maping controls to Datacolumns in SQL server
- when textboxes re to be mapped to columns in SQL server, should we define the variables in VB.Net that ll contain those textbox text values as Sql types or only as CLR types for ex if I ll do: textbox1.text=MyName, should define MyName as string or sqlString, and so on for int, sqlint, Boolean, sqlboolean…. - I wanna map a checkbox directly to a column in SQL server using sqlparameter: so if the checkbox is checked, then my column ll have the value (true o 1), if not checked the column ll have 0 or false. But I don t want to do a check function like this: If checked=true then pm.value=sqlboolean.true Else pm=sqlboolean.false end if. That d not be normal I guess. How do I do that ...Show All
.NET Development Adding a List to another
Hi! I wanna know if is it possible to add a List to another. Are there some method to do it in List class Thanks. Hi Danilo OK, what you're looking for is clearer, now. This forum is for VSTO-related questions. Your problem has more to do with the .NET Framework, generally. So I'm moving your message to a more appropriate forum :-) ...Show All
SQL Server partitioned views Explain Plan
Hello I created a partitioned view on my database db1 and It comes from the UNION ALL of 2 tables (I split 1 very big table in 2 smaller tables... Horizontal partition!!) that are on the same db1. When I query them I receive in the EXECUTION PLAN an Item called CONCATENATION of both input tables, This seems to be more expensive than using only one big table so partitioning the big one gets none sense.. I would like to know if this is normal and If I'm doing well with partitioning. Please see the script below: CREATE TABLE [dbo].[TREP_NOVEDADES_2006] ( [NMSEC_NOVEDAD] [numeric](12, 0) NOT NULL , [CDCONCEPTO] [varchar] (12) NOT NULL , [CDTIPO_VALOR] [char] (1), [CDPRECIO] [varchar] (12), [CDTIP_HECT_DTO_PAG] [varchar] (2), [FEG ...Show All
SQL Server AS2005 very poor performance w/ DistinctCount
Hi, We are a performance issue with a cube in AS2005 with the following characteristics: Measure: 1 DistinctCount – MeasureA. 1 Sum – MeasureB. 1 Calculated – MeasureC = MeasureB/MeasureA. Empty behavior is activated for both base measures. Data can be divided in 2 clusters: For data type X we load ~3 million rows per month (partition) to AS2005. For data type Y we load ~25 million rows per month (partition) to AS2005. Dimensions: 11 dimensions with 22 hierarchies. One dimension has a default value to restrict data to type Y. We have 24 partitions – 12 monthly partitions for each data type. All partitions have defined slices for both month and data type. The performance is very poo ...Show All
Visual Studio Team System Development Group - Please help! Cannot compare databases.
I simply cannot compare two databases in my environment without the application erroring out. I've tried it from multiple machines, freshly installed, and it keeps happening. I wonder if there's something unique about my environment, but I need help to determine that (by looking through the error logs to locate the problem...) Can someone from the development group please help !! Please direct me toward what information you need and where I can get it to help you. I'll be happy to do whatever will help you troubleshoot this. I would love to make this tool work and avoid going out and purchasing Red Gate (my trial is almost up :-) -M- -M-: Has your issue been resolved If not, have you contacted ...Show All
Visual Studio Tools for Office Applying Formatting to Excel columns programatically
I am coding in VB.net (VS2003). The output of my program is an Excel spreadsheet. Everything works except some of the formatting. I have: ws.range("J").NumberFormat = "0%" and ws.range("K").NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-"" _);_(@_)" where ws is dim'd as a worksheet The formatting syntax is copied from a VB6 program. However, I am coding in VB.net (VS2003) and it is giving me runtime errors: System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyB ...Show All
Visual Studio Team System Customizing team build number?
When Team Build launches, it automatically assigns a build number of the format: <BuildTypeName>_<YYYYmmdd>.<number> This is pretty heinous and means essentially nothing to our QA department who is used to build numbers like 5.30.010. Under other circumstances I wouldn't be so picky but I've just discovered that the bug tracking uses these numbers to populate its drop down list of build numbers. Is there any way to change this number I suspect from what I know about Team Build that the answer will be no. I have thought of a work around but I would really not go through the hassle (the work around being to change the name of the build type before every build by using a tf rename command, such that it would be som ...Show All
Visual Studio How to configure SDC for MSBuild
I'm trying to get the latest version of my project through msbuild project. I have defined a SourceSafe.Get task (from Microsoft.Sdc.Tasks project) to do that. When I try to execute the task I get the following error: "Unable to find the Visual SourceSafe registry key" I can't find any information about this issue... This is the task in the .proj file: <Target Name="Latest"> <SourceSafe.Get UserName="raul" Password="" Database=""\\amon\dfs\VSS ilitia"" Project="$\Proyectos\MyProject" WorkingDirectory=".\" > </SourceSafe.Get> </Target> Following, the complete output ...Show All
Visual Studio Express Editions I'm Very New!! Help with Tutorials
Hello, Sorry but I am new and pretty much blank to programming. (Done basic web design) I have worked along side people using VB and PHP and understand to a level what is going on, however never worked on it alone and dont know all the correct language to produce what I want. With that in mind I found VB Express through a friend and started doing the tutorials. However i tried to write my own after a basic tutorial and it wont work and I have no idea why when I am just following the rules in the Tutorial Dim aString As String = "Look at me" Dim bString As String = "you hairy beast" Dim cString As String = "" 'Displays "The test". MsgBox(cString = aString & " " & bString) But it does not display it. What am I doing wrong ...Show All
.NET Development One call to DB for multiple datatables?
Is it possible to fill multiple datatables in a dataset with ONE call to the database Ex: Select OrderNumber from Orders where OrderNumber = @OrderNumber Select OrderItem, Quantity from OrderDetails where OrderNumber = @OrderNumber There are two select statements which are master detail related. In my application, I would actually need three or four related tables. I tried using the .GetChildRows method but that requires that both datatables already be filled. I basically want to bring back several orders and ALL of their related order details at one time! What I am trying to do is load a treeview with 3 or 4 levels of data. I am trying not to have to make a call to the database for each node le ...Show All
