Perry Choy's Q&A profile
.NET Development .NET framework data provider
Has this been previously reported Using a multi-line textbox control enter a back slash ('\') and then hit the return key and enter more text. Take this data and insert/update it to a column defined as varchar in a MSSQL table. The back slash plus the carriage return and line feed are gone! Repeat again but this time put a space after the back slash ('\ ') before hitting the return key and you will find that the back slash and the carriage return line feed are all stored properly. Is this one of those Microsoft 'by design' implementations or is the data provider mistakenly identifying the back slash as an escape character because it immediately precedes the carriage return line feed The backslash charact ...Show All
SQL Server Odd Behavior in reverse() or syaltfiles?
I originally posted this question on dbforums. Does this happen to anyone else http://www.dbforums.com/showthread.php t=1614086 The short of it is, install SQL Server 2000 to a non-default location that has a shorter path than the usual C:\Program Files\Microsoft SQL Server\blah\blah\blah. Say E:\MSSQL8. Now run these queries, and see if you get the same oddities I get: select filename from master..sysaltfiles where dbid = 2 go select reverse(rtrim(filename)), filename from sysaltfiles where dbid = 2 go select reverse(rtrim(filename)) from sysaltfiles where dbid = 2 I can verify this happens here too... that's pretty cool you found this (excluding the headache it causes). select Convert ( varchar , ...Show All
Audio and Video Development Release notes for MF in RC1
I know there has not been much change in the SDK between 5472 and 5600. But it would still be nice to know what has been fixed, what has changed, etc. Congrats on releasing RC1! Thanks! Marc Hi Marc, You're right that the SDK itself hasn't had significant churn between 5472 and 5600. As for bugs that have been fixed, etc, well... a lot I don't have a laundry list handy of everything that has been fixed, but if you have any specific questions about Media Foundation functionality you thought was broken in 5472 that you wanted to know whether it's been fixed, I can try to answer. P.S. All other things being equal, I'd definitely recommend moving on to 5600. It's nice. ...Show All
SQL Server Problems connecting to SQL2K after install on same server as SQL 2005
We have a current install of SQL2005 Developer on a Win 2003 Server Enterprise and it works as advertised. It is accessed as Test05 Yesterday a SQL2000 Developer Edition was also installed on the same Server as named instance Test05\Test052000. The 2000 seems to start and run OK and can be connect to by Management studio etc from that same box. However it can not be connect to via the network. Any ideas You will have to make sure that the system and SQL Server are set up to allow remote connections to the server. Look at this KB Article . ...Show All
Visual Studio 2008 (Pre-release) How to setting Background Property to a LocalResource
MyControl.Background = SystemColors.ControlBrush; I want the change the above line to reference a LinearGradient brush I created. < LinearGradientBrush EndPoint = " 1,0.5 " StartPoint = " 0,0.5 " x:Key = " OrangeGradBrush " > < GradientStop Color = " #FFD29A48 " Offset = " 0 " /> < GradientStop Color = " #FFFFFFFF " Offset = " 1 " /> </ LinearGradientBrush > How would I do that in the C# code behind file I see how to do it in the XAML but I need to add it to the code behind since the background color is dynamic depending on some business logic. Thanks! Not clear from yo ...Show All
Visual Studio Express Editions questions part1.........
hi........ Q1. how can we synchronize the time in the server to my application do we need sql server on this i used only ms access as database... Q2. how can we set 2 applications related on each other........what i mean is, you cannot open/connect application1 without application2 open.... Q3. what is console all about what is the purpose is it related on application we made how to synchronize the time of the computer server to my application 'my database was access and i did'nt use sql server express either..... i'm sharing a folder containing the database access to connect to my application...... ...Show All
Visual Studio 2008 (Pre-release) FatalExecutionEngineError after Lambda.Compile()
Dear Linq, I compile a LambdaExpression and call into it. On one machine, executing the compiled code causes FatalExecutionEngineError, on another, the app just dies with "The app has encountered a problem" message. The exception cannot be caught. This occurs with Linq version May 2006 CTP: Microsoft (R) Visual C# 2005 Compiler version 8.00.50916 for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727 Any ideas Thanks, George using System; using System.Reflection; using System.Expressions; using System.Query; class Crash2 { public static void Main() { try { Expression<Func<DataReader,int >> lambda = BakeLambda(); Console.WriteLine("Before compile"); Func<DataReader,int > comp ...Show All
Visual Studio 2008 (Pre-release) Error Window1 dosnt contain a definition for 'Invoke' Help please
Here is the line of code with the Invoke in it:: this .Invoke( new delUpdateHistory (( this .UpdateHistory)), para); The Line Below is the Delegate for the above:: public delegate void delUpdateHistory ( string str); Which goes to this section of code:: public void UpdateHistory( string str) { // some code } this.Invoke produces this error:: Error 1 'iSCS.Window1' does not contain a definition for 'Invoke' Invoke from what i have read is supported by .NET 3.0 Framework so basically i shouldnt have to use using System.Windows.Forms( .NET 2.0 ). So how do i use "Invoke" here WPF does not have an Invoke method ...Show All
SQL Server About Sql Statement
I am writing Procedure in SQL Server 2000, and i am giving three inputparameters ie: Account number and from date and to date.but in will give input to procedure as account number or from date and todate. So in select command how can i write, ie i will give input any one ie accno or ftomdate and to date. i will write sql query which i write but it is giving error Select * From Mf_Tran_Reg Where mft_fundcd= 'RMF' and mft_purred='P' if @Folio = '' begin and mft_procdate between @Fdate and @tdate end else begin and mft_accno= @Folio end Hi Majid, CREATE PROCEDURE SomeProcedure ( @mft_accno INT = NULL, @Fdate DATETIME = NULL, @tdate DATETIME = NULL ) AS Select * From Mf_ ...Show All
Windows Forms row error
hi, i tried all combinations possible, i get the hasErrors to work only when there is more than 1 record in tb1. for the first record i add and press save, it goes into msgbox no. how can i refresh or somthing Private Sub Save( ByVal e As Object , ByVal er As EventArgs) Handles mySave.Click CompareTwoGridsForEquality() CompareCompleteness_of_grid2() checkCompletenessOfallRowsInGrid1() If Me .ds.Tables( Me .tb1name).HasErrors Then MsgBox( "yes" ) Else : MsgBox( "no" ) End If End Sub It works if i press save twice., thats the full code for the section why is that it only get the errrors on the second try. Private Sub Save( ByVal e As Object , By ...Show All
.NET Development Conditional floating-point precision using aliases
I have a project where I need to be able to switch between using System.Single and System.Double according to whether I need to optimize for performance or for precision. So far I've solved the problem by putting the following test on top of each source file where I need the switch: #if d_real using real = System.Double; #else using real = System.Single; #endif So I use the real alias wherever I want the flexibility of compiling my libraries either for double or single, and can switch the precision by choosing a configuration where the conditional compilation symbol d_real is defined or not. The real type is only used for those parts where it is beneficial to be able to switch and it used consistently so as to not get any invalid casts. In ...Show All
SQL Server new at this, question with variables in trigger
Hey all; Taking a college class, but I'm having difficulty with use of variables. The question basically just wants me to update the inventory amount if an item is ordered. I can do that OK (so I'm not cheating), but I though I would add some bling - and check for the case where more was ordered than was available. I cant get the variable definition down, though, so I can use them in an if statement. Please consider the following; IF EXISTS ( SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID ( N '[dbo].[trg_line_prod]' )) DROP TRIGGER [dbo] . [trg_line_prod] GO CREATE TRIGGER trg_line_prod ON dbo . LINE FOR INSERT AS DECLARE @NumProdAdded INT , @NumProdAvail INT ...Show All
SQL Server Is it possible to create clustered index for multi tables within a SQL Server 2005 database within a query?
Hi, all, I am having up to serveral hundred tables within a SQL Server 2005 database, up to 200 of them are without any clustered index. Is it possible to create clustered indexes for all of them together in a same query :) Thanks a lot for any guidance and advices for that. With best regards, Yours sincerely, Yes, it is possible with WHILE loop and dynamic SQL (with either sp_executesql or EXEC statement) that calls CREATE INDEX. However, the tricky part is you have to specify the column(s) for each table to be included in the index in the CREATE INDEX statement. So if you have a way to programmatically get the table names and the index column(s) for each table, it is easy to do the rest. ...Show All
Visual Basic VB.NET and 3d Models (Theory)
Hello, - I'm interested in looking at how you can create a 3d model and drag it into vb.net to matipulate, such as for a small game or just a charactor... is this possible or do we need to use the drawing object and pretty much build it in the program - How do you create an enviroment that will allow you to do this (using a 3d model in vb.net, make it move, react, interact) - What type of 3d model are you able to do this with (extenstion ie: .exe, .jpg etc and what program would you use to create a 3d model with that type of extenstion and what type of things should you understand when you are creating a 3d model, how will a language pick up on points of the 3d model to manipulate ) - Would VB.NET be the language to do somethin ...Show All
Windows Forms How to include SQL Server database with ClickOnce deployment
I am writing an application that I want to distribute with ClickOnce Deployment. It seems easy enough, simply click the "Publish" option and answer the questions from the wizard. However, there are a few questions that I can't readily determine the answer to: 1) My application uses Sql Server. I see that as part of the prerequisites, Sql Server 2005 Express Edition was included. However, how will the database I created on my development machine be transferred to users machines Can I just back up my database and programatically run restore as part of the install Or, will I have to use scripts in order to creeate and populate the database 2) I currently have a connection string that is unique to my system. What connection s ...Show All
