Andrew Baker's Q&A profile
SQL Server Getting T-SQL code for a stored procedure
I need to have my middle tier code get the T-SQL code for a stored procedure. So, I need to create a string something like: string tsqlCode = @"CREATE PROCEDURE \"NSInsertGenerator\" @GeneratorName NVARCHAR(255), @SystemName NVARCHAR(255), @ThreadPoolSize INT, @ActivationState TINYINT AS INSERT INTO \"NSGenerators\" ( GeneratorName, SystemName, ThreadPoolSize, ActivationState) VALUES(@GeneratorName, @SystemName, @ThreadPoolSize, @ActivationState) GO" This string will be analyzed by the middle tier code so that the list of paramet ...Show All
Community Chat My Browser.
I have created another browser using MFC. And I have finished it. It is much like maxthon but more. I have improved some nice features according to my using experience with maxthon. But,since maxthon was so popular,and IE7 have released,firefox too. I doubt whether anybody interested. How should I release it Much thanks. Have you looked at http://www.gotdotnet.com From there, you can create a project for your application, and even share the source code with everybody else! ...Show All
.NET Development Is this a bug , any one can tell me?
I found a bug when I am programing: when I use like this: " ".IndexOf(" ") is returns -1,when it should return 9; but " ".IndexOf(' ') is OK. and belows all worked well: " ".IndexOf(" "); " ".IndexOf(" "); " ".IndexOf(" "); My environment is : Windows XP SP2(English Edition + Mutil-Language Pack) + .NET Framework v2.0.50727+Visual Studio 2005 PS: It works well in javascript. Actually, it is entirely by design. The trailing character at the end of the string is U+ff9e, a.k.a. HALFWIDTH KATAKANA VOICED SOUND MARK. It is treated as a diacritic attached to the preceeding character, and as such it modifies it's identity, the sama way that a latin letter plus a diacritic is not equal ...Show All
Software Development for Windows Vista CompositeActivityValidator
Hi All, What is the difference between CompositeActivityValidator and ActivityValidator Can you provide examples for using CompositeActivityValidator. Regards, Chakri. I used ActivityValidator for custom composite activity. I didnt find any difference in using with activityvalidator (or) compositeactivityvalidator. Can you explain more with example please. Regards, Chakri. ...Show All
SQL Server notifying end user of the sync completion
hi all, i have 20 replication task per day i wan't to notify my end-user that all these task has sucessfully completed using a single email. I know each task can send email individually but thats not what i need TIA thanks, joey ...Show All
Game Technologies: DirectX, XNA, XACT, etc. World to screen conversion.
Hi. Something weird when trying to covert world to screen coordinates. Vector3 res = Vector3.Transform(worldPoint, Camera.View * Projection); I get the result vector with values greater than 1. Aren't the values post projection supposed to be clamped Both the view and projection matrices are valid (and are used to display on screen). Cheers Using the model's world transformation, the position you provide should be in the model's object space. The model.Position actually provides the position of the model in world space, so you could just use Vector3.Zero instead, or keep model.Position and change the world transformation to the identity matrix. ...Show All
.NET Development Need help with makeing an array from data in dataset based on criteria
Can someone tell me what is wrong with this code. I'm trying to add values to my array with data from a dataset that matches the criteria that I want. Dim actarray() As String 'Dim actarray(Me.DataSet.WorkList.Rows.Count - 1) As String Dim i As Integer Dim n As Integer For i = 0 To Me.DataSet.WorkList.Rows.Count - 1 If Me.DataSet.WorkList.Rows(i).Item("DSK") = "LK1" Then actarray(n) = Me.DataSet.WorkList.Rows(i).Item(0) n += 1 End If Next MsgBox(actarray.GetUpperBound(0).ToString) For i = 0 To (actarray.GetUpperBound(0)) Me.ListBox3.Items.Add(actarray(i)) Next MsgBox(Me.ListBox3.Items.Count) Once I get to the part inthe code were I assign t ...Show All
.NET Development installing .net framework SP1 problem
I was just trying to install the sp1 for 1.1 on a media center pc and i need it because i want to connect to my 360.. Anyways, the message: (Microsoft Visual C++ Runtime Library runtime error! Program: C;/WINDOWS/system32/msiexec.exe This application has requested the Runtime to terminate in an unusal way. Please contact the application;s support team for more information) i have windows installer 3.1 and framewark 2.0 and 1.1 installed and it wont let me uninstall them either, same message comes up. Please can anyone help me Hi mAh3u, can you share your solution for anyone else who might be running into this Cheers, JJustice [MSFT] ...Show All
SQL Server Trouble with Package Configuration
Hello I'm having trouble setting different variables in my configurationfile. I've a "Send Mail Task" and apparantly I cannot change subject, if subject contains other variables For instance. "User-defined Search Result: Succes - Order no.: " + (DT_WSTR, 10)@[OrderExtract::order_id] If I look in the .dtsConfig it shows: User-defined Search Result: Succes - Order no.: 0 , and even when I try to change User-defined til Userssss-defined it has no effect. Am I doing something wrong Kind regards Janus, DK The reason your configuration file change is having no visible effect,is because the configured Subject property of the send mail task is later overriden by the expression ...Show All
Smart Device Development How to use PlaySound API to play sound from a Resource?
Hi. I'm developing a Smartphone app using VB.Net 2005 and the Compact Framework v2. I want to play a sound that is in a resource of my EXE, using the PlaySound API. Declare Function PlaySound Lib "coredll.dll" ( ByVal pszSound As String , ByVal hMod As IntPtr, ByVal fdwSound As Integer ) As Integer To do so, according to the PlaySound documentation, the second parameter of the API - hMod - needs to be the "Handle to the executable file that contains the resource to be loaded." But I can't find a way to get the handle of my EXE. Any help is appreciated. Tony Perhaps I should... Or perhaps feedback statement is somewhat incorrect as there's act ...Show All
SQL Server Connection to DB from VB.net express
When trying to connect to a db in VB.net express I get this warning An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) this is my code 'verbing maken mat de db Dim DBconnection As New SqlClient.SqlConnection( "Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\Pieter Van Driessche\Mijn documenten\Visual Studio 2005\Projects\kasboek\kasboek\db1.mdf';Integrated Security=True;User Instance=True" ) DBconnection.Open() Can somebo ...Show All
SQL Server Unpivot Transformation and Expressions
I am using the unpivot transformation, but I can't figure out how to use an expression in the Pivot Key Value. The denormalized table I want to unpivot has columns like Sunday_Qty, Monday_Qty, Tuesday_Qty, etc. Just before the unpivot component, I inserted a derived column component that adds fields like DateSun, DateMon, DateTue, etc. that resolves to values like 01/07/2007, 01/08/2007, etc. So for the various rows in the Unpivot Transformation Editor, I entered DateSun, DateMon, DateTue, etc. for the Pivot Key Value, and "EntryDate" for the pivot key value column name. The data pipeline gets unpivoted correctly, but the rows have the literal values "DateSun", "DateMon", etc. in the EntryDate column. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Problem using .FBX file
I have a model that I downloaded off of TurboSquid. I pulled it into 3DS MAX 9, and exported it as an FBX file. I added it to my project, and when I try to compile I get the following error: BasicMaterial has a texture, but geometry does not contain texture coordinates. Is this a problem with 3DS or GSE Any ideas on how to fix it Eli, I was using 2006.08, so I upgraded the plug-in and tried again, unfortunately I got the same error. So I then exported it as ASCII and did a search for LayerElementUV; here is what was there: LayerElementUV: 0 { Version: 101 Name: "UVChannel_DIFFUSE0" MappingInformationType: "ByPolygonVertex" ReferenceInformationType ...Show All
Visual Basic IDE says OK but compilation fails
I am developing a web site/system using VS2005, ASP.NET and VB.NET. Suddenly I ran into a problem where I cannot build my site any more. The message is: ..path../UserOwner.aspx.vb(1278,0): error BC30451: Name 'a3333' is not declared. BUT the (in this case) label a3333 is declared. When I edit the behind code there is also no "bubble lines" telling me there is a problem. But as soon as I hit Run - I get this message in this code. It look's like I have hit a "limit" as all objects created "before" in this page works perfect, but all objects "after" fails in the compilation. This happens around the 180th object on this page. If I as example drop a new button object on the page - set's the ID ...Show All
SQL Server Ordering and rearrangement records.
Hi, I have a table records like below. name priority ------------------------------ John 2 Mike 10 Soo 5 Jane 8 I want rearrange the table records like this. name priority ------------------------------ John 0 Soo 1 Jane 2 Mike 3 In other words, rearrange order by priority and change the value to zero-base. Are there simple queries for this function Use this generic query ... Update PriorityTable Set priority = NewPriority From ( Select MainTable.Name, NewPriority From PriorityTable as MainTable Join ( Select Main.Name, Count(Distinct Sub.P ...Show All
